Your suggestion surely helps in one of my scenarios but it doesnot address my main concern. Let me explain my situation with help of sample code below:
<HTML xmlns="http://www.w3.org/1999/xhtml">
<SCRIPT language=javascript type=text/javascript src="/JavaScript/Global.js"></SCRIPT>
<BODY>
<SCRIPT type=text/javascript>
//<![CDATA[
function _hdrRaisePopup()
{
if (typeof (top.PopupWindow) =='function') { //in LTAF, error occurs here
top.PopupWindow('/samplepage.aspx', 800, 600); //('top' refers to LTAF frame instead of main window where JS file is included)
}
else if (typeof (top.ShowPopupWindow) =='function') { //same here
top.ShowPopupWindow('/samplepage.aspx', 800, 600) //same here
}
else {
alert('Unable to raise popup window');
}
}
//]]>
</SCRIPT>
<div>
<IFRAME style="WIDTH: 240px; HEIGHT: 660px; TOP: 55px; LEFT: 0px" id="id1" src="/menupage.aspx" name="navMenuFrame" ></IFRAME>
<IFRAME style="WIDTH: 1352px; HEIGHT: 940px; TOP: 55px; LEFT: 244px" id="id2" src="/mainpage.aspx" name="mainFrame" ></IFRAME>
<IFRAME style="WIDTH: 1352px; HEIGHT: 0px; TOP: 995px; LEFT: 244px" id="id3" src="/detailpage.aspx" name="detailFrame" ></IFRAME>
</div>
<!-- Other HTML elements ... -->
</BODY></HTML>
On line 2, external JavaScript is referenced and appended in top-level window of the browser.
Now, when frames on line 23, 24, and 25 are navigated to respective pages, script error occurs same as mentioned on line 9, 10, 12 & 13.
So basically, in javascript code wherever is the reference of 'top' keyword, it will not work as 'top' refers to the LTAF frame instead of my app's main frame window.
FRMJiggs
Member
4 Points
5 Posts
Re: Using LTAF to automate a page with frames.
Apr 20, 2009 03:31 PM|LINK
Federico,
Thanks for your quick response.
Your suggestion surely helps in one of my scenarios but it doesnot address my main concern. Let me explain my situation with help of sample code below:
<HTML xmlns="http://www.w3.org/1999/xhtml"> <SCRIPT language=javascript type=text/javascript src="/JavaScript/Global.js"></SCRIPT> <BODY> <SCRIPT type=text/javascript> //<![CDATA[ function _hdrRaisePopup() { if (typeof (top.PopupWindow) =='function') { //in LTAF, error occurs here top.PopupWindow('/samplepage.aspx', 800, 600); //('top' refers to LTAF frame instead of main window where JS file is included) } else if (typeof (top.ShowPopupWindow) =='function') { //same here top.ShowPopupWindow('/samplepage.aspx', 800, 600) //same here } else { alert('Unable to raise popup window'); } } //]]> </SCRIPT> <div> <IFRAME style="WIDTH: 240px; HEIGHT: 660px; TOP: 55px; LEFT: 0px" id="id1" src="/menupage.aspx" name="navMenuFrame" ></IFRAME> <IFRAME style="WIDTH: 1352px; HEIGHT: 940px; TOP: 55px; LEFT: 244px" id="id2" src="/mainpage.aspx" name="mainFrame" ></IFRAME> <IFRAME style="WIDTH: 1352px; HEIGHT: 0px; TOP: 995px; LEFT: 244px" id="id3" src="/detailpage.aspx" name="detailFrame" ></IFRAME> </div> <!-- Other HTML elements ... --> </BODY></HTML>On line 2, external JavaScript is referenced and appended in top-level window of the browser.
Now, when frames on line 23, 24, and 25 are navigated to respective pages, script error occurs same as mentioned on line 9, 10, 12 & 13.
So basically, in javascript code wherever is the reference of 'top' keyword, it will not work as 'top' refers to the LTAF frame instead of my app's main frame window.
I hope I am clear enough to explain my situation.
Kindly post any further questions
Thanks,
Jignesh
- Jignesh