jQWidgets Forums
jQuery UI Widgets › Forums › Navigation › Tabs › Tab Title change based on content [drop down value] change.
Tagged: DropDownList, iframe, jqxDropDownList, jqxTabs, setTitleAt, Tabs
This topic contains 4 replies, has 3 voices, and was last updated by panky 11 years, 5 months ago.
-
Author
-
Hi
I have Tab control where I am adding Tabs dynamically [On Add New btn click]. I have tab content as <IFrame> witf src to ABCD.aspx page with query string paramters to load page data.
var cnt = '<div id="Content"' + pageIndex + '"><iframe id="iframe2" src="..//ABCD.aspx" frameborder="0" vspace="0" hspace="0" marginwidth="0" marginheight="0" scrolling="no" height="100%" width="100%"></iframe></div>'; $('#jqxTabs').append($(cnt));
On my ABCD.aspx page I have dropdown, on selection change I wan to Set Title of current Tab to selected value of dropdown.
I have below on OnClientSelectedIndexChanged event of dropdown, but it didn’t work.
$(‘#jqxTabs’).jqxTabs(‘setTitleAt’, i, item.get_text());
Thanks
Panky
Hello Panky,
It is not possible to call methods of elements in the parent page from the iframe.
Best Regards,
DimitarjQWidgets team
http://www.jqwidgets.com/Thanks Dimitar,
Looks like my question is similar as below, just I want to change Tab Title on selection change of my content drop-down or on save button click on my content page.
http://www.jqwidgets.com/community/topic/change-tab-title/
Thanks
PankyHi Panky,
Just to add what Dimitar wrote. It will not be possible to change outer page’s Tab by selecting DropDown which is in IFrame because this is a security issue – you try to access a Document from another Document. If your DropDown is on the same Document as your Tab is, then there is no problem as you can just use the “setTitleAt” method of jqxTabs, but in the way you try to do it $(‘#jqxTabs’) will be Invalid selection as its from another document.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.com/Hi
I did this as below.
On Selection changed in my IFrame page js function I called patent.SetTabTitle(newtitle)
and in Patent JS file in SetTabTitle(title) function I set New Title of Tab using SettitleAt method.
-Panky
-
AuthorPosts
You must be logged in to reply to this topic.