Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Tim Sanders on Nov 05, 2008 17:13
open dhtmlx forum
tabbar - error on setContentHref

I have been struggling with loading a url into a tab's content. I simply want to have a different url loaded when each tab is clicked. I was trying to use the javascript object method as below to set the url for the "orders" tab:

<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>New Page 1</title>
<script type="text/javascript" src="codebase/dhtmlx.js"></script>
<link rel="STYLESHEET" type="text/css" href="codebase/dhtmlx.css">
</head>

<body>

<div id="reltabs" style="width:100%; height:50%;">
</div>


<script>
        tabbar=new dhtmlXTabBar("reltabs","top");
        tabbar.setImagePath("codebase/imgs/");
        tabbar.setSkinColors("#FCFBFC","#F4F3EE","#FCFBFC");
    tabbar.sethrefmode="iframe";
        tabbar.addTab("tasks","Tasks","50px");
    tabbar.addTab("orders","Orders","50px");
    tabbar.addTab("svcorders","Service Orders","100px");
    tabbar.addTab("receivables","Receivables","100px");
        tabbar.addTab("invoices","Invoices","60px");
        tabbar.addTab("contracts","Contracts","60px");
        tabbar.addTab("notes","Notes","50px");
        tabbar.addTab("extdata","Extended Data","100px");
    tabbar.setContentHref("orders","http://www.google.com");
    tabbar.setTabActive("tasks");

</script>

</body>

</html>

The page gives me the error "this content[...] is null or not an object" and I can't determine what's wrong. I'm not sure I know how to properly reference the href for the tab. If I comment out the setContentHref I don't get an error.

Thanks in advance for your help.
Answer posted by Support on Nov 06, 2008 02:03
>>  tabbar.sethrefmode="iframe";
must be a 
  tabbar.setHrefMode("iframe");

All other code is correct. Without correct setHrefMode command tabbar initialized in static content mode which cause a error for setContentHref command