I need to recover the url of the a UltraWebTab.tab after she changes in his/her internal navigation. How do I make that?
I get to recover the initial url of the tab and after navigating in the it paginates of the web that opens inside of the tab the address url the initial stays of when the tab was created.
the code in javascript is:
function RecoverUrlTab() { var ultraTab = igtab_getTabById("uwtConsultarProcesso"); if(ultraTab != null) { var Tabs = ultraTab.Tabs; for(i = 0; i < Tabs.length; i++) { var tab = ultraTab.Tabs[i]; var target = tab.getTargetUrl(); } } }
I thank who can help!
Hi,
You may use tab.elemIframe member. For example:
var tab = ultraTab.Tabs[i];var url = tab.getTargetUrl(); // or tab.targetUrlif(url) tab.elemIframe.src = url;
There are also other objects to use like tab.elemIframe.contentWindow.location, etc. However, all that probably is available only within local server. If user will go to www or something like that, then security of browser will block your access to all those objects and you will not get current location (or iframe.src).
Hi viktor,
In our website also we are using the elemIframe object and oTab.elemIframe.contentWindow object. Can you tell me exactly with what security settings in IE we will not be able to access this object ? Also if possible can you tell us a workaround to get the frame object ?
Thanks in advance.
You did not say anything about type of TargetUrl. I can only repeat that if it is not a local to application url, then there is nothing UltraWebTab can do for that. All javascript features of tab are just help wrappers for html elements used by it. Application may get references to them by itself by exactly same way at to any other element on page. Browsers block (and must block) public access to all javascript features objects which are not local (like document and window of iframe which points to www).
Thanks for your quick response. our case is we have a main aspx page which has some 10 tabs in it. Now when you resize this aspx page we wrote a JS function to resize the tabs also.
{
var webTab = igtab_getTabById("myUltraWebTab");
var intPadding = parseInt(_cp.style.paddingTop.replace("px",""), 10) +
// set it to zero
intContentHeight = 0;
}
objTab.elemIframe.height = intContentHeight; //Also can u tell us whether this line will work on www or not ?
_cp.style.height = intContentHeight + intPadding;
webTab.element.height = intContentHeight + intPadding + 16;
Sure you can get reference to parentNode from iframe and set its width/height/src, etc. You can not get content of iframe which points to www.
Codes looks fine with me. I can suggest to use elem.style.width/height instead of (or in addition to) elem.width/height to set size of elem.
To get reference to td which contains divs and iframes you also may trydocument.getElementById(oWebTab.ID + '_cp');though, iframe.parentNode/Element should work too.
Oh I see what you were saying. Thought like we cannot access oTab.elemIframe when our site is deployed as www.
Anyways thank you so much for your input on clarifying my doubts.