Sep 29, 2008, 1:28 AM
[CLOSED] HowTo AutoLoad a relative path IFRAME into each tab
I can't figure out how to do the following and would appreciate any pointers:
I want each tab in a TabPanel to contain an IFRAME, where the IFRAME SRC is a relative path (i.e. "..\IFrameTarget.aspx"). And, I want the IFRAME to only load when the tab is selected.
Assigning the Tab.AutoLoad to the <iframe> string like below doesn't work. The tab just says 'loading...' and never loads.
tab.AutoLoad = "<iframe src='..\IFrameTarget.aspx' id='iFrame1' ></iframe>";
I saw in another thread where if the AutoLoad string begins with an 'http' like below, that an IFrame is automatically generated. tab.AutoLoad = "http://somesite.com";
This is cool, however this won't work with relative urls such as "..\IframeTarget.aspx" because they dont begin with "http". I've suggested an enhancement request for an AutoLoadIFrame feature that will assume the url is value and will AutoLoad the tab with the appropriate <iframe> when it is selected.In the mean time, I'm trying to build this myself with script. Calling an OnTabChanged event is easy enough, but I can't figure out three things:
1) How to set the tab.html = "<iframe ....></iframe>" on the client side
2) How to tell if the tab's html has already been set from a previous selection
3) How to have a 'Loading..." graphic appear while the IFrame is being loaded.
Any help would be appreciated.