View Full Version : Opening two frame windows
rfchmbrs
05-24-2002, 11:04 AM
Suggestions on how to make this work in Netscape 4.x. It is fine in NS6.2 and IE. Can I make it into a script that will work?
Thanks,
RON C
<form>
<center>
<input type=image src="home.gif" border="0" hspace="0" vspace="0" height="32" width="132" align="MIDDLE" onclick="top.frames[1].location='buttons2blank.htm';top.frames[2].location='home.htm';return true;">
</center>
</form>
scoutt
05-24-2002, 04:38 PM
top?
use it this way
onclick="parent.frames[1].location='buttons2blank.htm';parent.frames[2].location='home.htm';return true;
rfchmbrs
05-24-2002, 06:59 PM
Scoutt,
Thanks for the response.
Neither top nor parent work in NS4.x.
Both work in NS6.2 and IE.
Now what do I try? Is there away to use js to open multiple windows in frames?
RON C ;)
rfchmbrs
05-24-2002, 07:05 PM
Scoutt,
I think it has something to do with: input type=image .
RON C
scoutt
05-24-2002, 09:55 PM
duh,, try onSubmit instead of onClick
rfchmbrs
05-25-2002, 01:01 AM
Works with input type=button value etc. onclick or submit only work with button.
Need to figure how to use button and have image for button.
RON C
scoutt
05-25-2002, 02:00 AM
<image src="home.gif" border="0" hspace="0" vspace="0" height="32" width="132" align="MIDDLE" onclick="parent.frame[1].location='buttons2blank.htm';parent.frame[2].location='home.htm';return true;">
rfchmbrs
05-25-2002, 11:48 AM
This doesn't work in NS 4.x. Something about image and onclick I think.
I'll keep playing as there is no documentation to help that I've found.
Thanks,
RON C
scoutt
05-25-2002, 11:57 AM
god I'm so stupid. try this.
<a href="#" onclick="parent.frame[1].location='buttons2blank.htm';parent.frame[2].location='home.htm';return true;"><image src="home.gif" border="0" hspace="0" vspace="0" height="32" width="132"></a>
also there is no such thing as align="middle" it is valign="middle" and not sure if that even works in an image tag
rfchmbrs
05-25-2002, 10:29 PM
I give up. I'm going to use the standard buttons with style. My neat buttons will never be seen.
How do I refer input type=button to a style that is shared with all buttons? I know I need a:
<style etc.>
????
</style>
in the head area. How do I get the button to refer to it?
Thanks for your time.
RON C ;]
scoutt
05-25-2002, 11:37 PM
ok this works for me. in NS4.7x needed to take off the return true; and change the frame[1] to the name of the frame and same goes with the other one. not sure why frame[0] didn't work as that is the standard.
<a href="#" onclick="parent.left.location='buttons2blank.htm';parent.right.location='home.htm';">
<image src="home.gif" border="0" hspace="0" vspace="0" height="32" width="132"></a>
Jon Hanlon
05-26-2002, 10:50 PM
input type="image" came out with HTML 3.2, so Netscape 4 will handle it.
<form onsubmit="otherGuys(); return false">
<center>
<input type=image src="home.gif" border="0" hspace="0" vspace="0" height="32" width="132">
</center>
</form>
<script language="Javascript">
function otherGuys() {
setTimeout("top.frames[1].location='buttons2blank.htm'",0)
setTimeout("top.frames[2].location='home.htm'",0)
}
</script>
Netscape has a tendency to stop dead in it's tracks once a form is submitted. For this reason we return false and thus cancel the submission. We use a setTimeout as it usually helps, and loads both at once.
top is a reference to the top frame. It's like saying 'as many parents as it takes'. You shouldn't use [1] and [2] but rather the names of the frames, like top.frames.leftFrame.location for example.
vBulletin® v3.6.7, Copyright ©2000-2009, Jelsoft Enterprises Ltd.