Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Kaveh on Jan 05, 2008 11:45
open dhtmlx forum
change label on tab load and...

First wanna thanks for your professional job..
1- I use ajax mode..I wanna change label of tab when it active and loaded..
2- I use another ajax for partial of content to reload something.. how can I change tab label?
I try setLabel on content of ajax back-end load.. but it seems that it wont run script loaded or in content loaded by ajax... is there anyway?
3- some of my tabs when load through ajax.. they need another tabbar in it..so how can i add another tabbar to this content from content loaded by ajax..?
4- 1 bug only in IE: when my page is loaded, I have 1 tab.. created by javascript.. but i can see tab scroll.. then when i'll add another tab.. it wont show that..
thanks
Answer posted by Support on Jan 14, 2008 09:43
>>1- I use ajax mode..I wanna change label of tab when it active and loaded..
You can catch moment when tab content loaded by
    tabbar.setOnTabContentLoaded(function(id){
          //id - id of loaded tab
          tabbar.setLabel(id,"any new label");
    });

>> on content of ajax back-end load
It possible to call commands directly from loaded content ( <script> tags in loaded content parsed, and their content evaluated )

>>so how can i add another tabbar to this content from content loaded by ajax
You can catch moment when tab loaded and init anything in it, or you can put javascript with tabbar initialization code directly inside loaded content
Answer posted by Reply on Jan 14, 2008 10:07
these are simple pages that show it won't parse <script> in both IE and FF..
index.html
<html>
<head>
<script src=ajax.js></script>
</head>
<body>
<div name=loading id=loading></div>
<div name=test id=test></div>                             
<script>
ajaxSend('GET', 'page.html', 'test', 'innerHTML');
</script>
</body>
</html>

-----------------------------------
page.html

something here
<script>
alert('here');
</script>

----------------------------------
so i couldn't create new tabber when content loaded by ajax..
and so i couldn't change tab label.. and more!

Answer posted by Support on Jan 15, 2008 02:13
Actually it works. Tabbar can't process external scripts included in content, but process inline script code correctly - please check attached sample.
Attachments (1)