Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Inma on Jan 21, 2008 06:45
open dhtmlx forum
dhtmlxTabbar with frameset

Hi everyone. We have a html frameset structure, with a tabbed menu in one of them. We are trying to load a page in another frame, by clicking on one of the tabbed options, but we can't. Is there any way to do it?

Thanks in advance for all.
Answer posted by Support on Jan 21, 2008 07:26
Tabbar provides onClick event which can be used for such task

    tabbar = new ...
    ...
    tabbar.setOnSelectHandler(function(id){
       //id - ID of selected tab
       //any custom code here
          top.frames["some"].document.location.href=...
       return true;
    });
Answer posted by Inma on Jan 21, 2008 08:26
Firstly, thanks a lot for your response. The problem is the location should be declarated in the XML file (we are using one for building the tabbed menu), and we don't know how to get it.
Attachments (1)
tabs2.xml592.00 B
Answer posted by Support on Jan 21, 2008 09:55
The href related to each tab can be fetched as
    tabbar._hrefs[ID]

In your case
    tabbar._hrefs["b7"]=="javascript:cargarPagina('/myApp/index.do')"
Answer posted by Inma on Jan 22, 2008 00:26
Hi again. We have been trying different tests regarding the problem I told you yesterday, but the fact is that tabbar2._hrefs sometimes has some content but others has nothing. I can't see why this is happening... Any idea about this?

Thanks in advance again :D
Answer posted by Support on Jan 22, 2008 05:54
The _hrefs array filled by data from XML , because data loading is async it not available directly after loadXML commands, you need to use
    tabbar.setOnLoadingEnd
or
    tabbar.loadXML(url,function(){
       //after loading code here
    });

If problem still occurs for you - please provide any kind of sample (you can send it directly to support@dhtmlx.com )