View Full Version : Moving frameset to right onload

Reno CF
02-11-2004, 08:59 PM
I need an information page popup to load on the right side of the screen when the user clicks a hyperlink (requesting the info). This popup page is in frames, and I'm having trouble getting it to work.

With a regular html page I'd just put onLoad="moveTo(20,200);" in the <body> tag, but with a frameset I have no body tag so am not sure how to proceed. I tried this without success:

<!-- Begin
function win() {
// End -->

Is there a way to move the small frameset window to the right (onload) using js?? Thanks...

02-11-2004, 09:30 PM
Can we see the code from the page you are talking about?

Reno CF
02-11-2004, 09:40 PM
The actual popup would be launched from a regular html page using this snippet:

<A href="alumni.html" target="popup" onclick="window.open('alumni.html', 'popup', 'width=300,height=450,scrollbars=1,resizable=1'); return false"><b>View alumni pictures</b></a>

And this is the code for the frameset that I'd like to have load on the right side of the screen (I had tried putting the js referenced in my first post in the <head> of this doc...

<title>Reunion Pictures</title>

<frameset rows="44,*" framespacing="0" frameborder="1" bordercolor="#C0C0C0" border="0">

<frame src="alumni_nav.html" frame name="F1" frameborder="1" scrolling="no" noresize target="F2">

<frame src="alumni_message.html" frameborder="1" framespacing="0" frame name="F2">

<body bgcolor="#FFFFFF">
<p>This page uses frames, but your browser doesn't support them. If you have gotten this message then you possibly need to upgrade your current browser.</p>


Roy Sinclair
02-11-2004, 10:23 PM
Are you unaware that you can position the window this way:

window.open('alumni.html', 'popup', 'top=20,screenX=20,left=200,screenY=200,width=300,height=450,scrollbars=1,resizable=1')

You have to specify the positions twice, once for Netscape and once for IE since they can't agree on what to accept for positions but this way your window is opened in the right place and doesn't have to move.

Reno CF
02-11-2004, 10:49 PM
Thanks Roy -- that was exactly what I was hoping to find... works perfectly...