Open page in an already open frame - works in ie but not in Mozilla

G

geefypants

Problem:
---------
- When link is clicked need website with frames to be opened first
- Next need to open second website in a frame defined in the first
website (frameset.htm - frame is mainFrame)
- Need to use javascript in order to make all of this happen in only a
second window. If that window is minimized it needs to automatically
be maximized or focussed to the front
- All of this works on Internet explorer - does not work with Mozilla
(which is what the product is on)
- Code is below

Questions
---------
- Is there a different way to go about doing this in javascript?
- Is there a setting in Mozilla about:config that is not allowing
javascript to find the frame mainFrame?



<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> Testing </TITLE>

</HEAD>

<BODY>

<script language="JavaScript" type="text/javascript">
function OpenMainPage()
{
var NewWindow=open('','popup','menubar=0,toolbar=0,location=0,directories=1,scrollbars=1,resizable=1,status=1,width=1000,height=640');NewWindow.focus();window.open('frameset.htm',TARGET="popup");
}
function OpenPage4(page)
{
open(page,TARGET="mainFrame");
}
function delay(gap)
{
var then, now;
then=new Date().getTime();
now=then;
while( (now-then)<gap)
{
now=new Date().getTime();
}
}

function OpenPage8(page)
{
OpenMainPage();
OpenPage4(page);
}
</script>

<BR><A HREF="javascript:OpenMainPage()">1 Open Main Frame</A>
<BR><A HREF="javascript:OpenPage4('http://www.yahoo.com')">4 Yahoo</A>
<BR><A HREF="javascript:OpenPage8('http://www.hotbot.com')">8
hotbot</A>



</BODY>
</HTML>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,733
Messages
2,569,440
Members
44,831
Latest member
HealthSmartketoReviews

Latest Threads

Top