Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by uday on Mar 01, 2009 23:04
open dhtmlx forum
how to load jsp content inside a tab (of dhtmlxTabbar)

We are trying to develop one web application with tabs. Found Tabbar application and we are thinking it may suite our needs.

For the tab, we want to set the content from a JSP page. We browsed thru the available documentation. But couldn't find the exact solution

tabbar.setContentHTML("a1","Some static text here");
tabbar.setContentHref("a2","http://some.url/here");

Please do the needful. We would be glad if you send us some samples w.r.t. the requirement.

Regards
Uday
Answer posted by Alex (support) on Mar 02, 2009 05:58

Tabbar provide different loading modes. 

You can find the samples in the tabbar package dhtmlxTabbar/samples/loading_creating_tabs_content/

If you choose the "ajax-html" mode, the possible solution is:

tabbar=new dhtmlXTabBar(container_id,mode);
tabbar.setImagePath(path_to_images);
tabbar.setHrefMode("ajax-html");
tabbar.addTab("a1","tab 1","100px")
tabbar.addTab("a2","tab 2","100px")
tabbar.setContentHTML("a1","Some static text here"); 
tabbar.setContentHref("a2","http://some.url/here");


Answer posted by Uday on Mar 02, 2009 20:50

tabbar.setContentHref("a2",http://some.url/here);

here i need to specify complete url....it would be comparitively slow right?

Answer posted by Alex (support) on Mar 03, 2009 02:55

In case of "ajax-html" loading mode here can be only the page which is in the same domain as the tabbar page. So, the full path is not necessary. 

iframe-based loading modes put pages into iframes. In this case here can be pages from different domains and url must be full.