Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 02-11-2004, 08:59 PM   PM User | #1
Reno CF
Regular Coder

 
Join Date: Jan 2003
Location: West Virginia
Posts: 110
Thanks: 0
Thanked 0 Times in 0 Posts
Reno CF is an unknown quantity at this point
Moving frameset to right onload

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:
Code:
<head>
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function win() {
onLoad="moveTo(20,200);"
}
// End -->
</script>
</head>
Is there a way to move the small frameset window to the right (onload) using js?? Thanks...
__________________
Reno CF
Reno CF is offline   Reply With Quote
Old 02-11-2004, 09:30 PM   PM User | #2
Antoniohawk
Senior Coder

 
Join Date: Aug 2002
Location: Kansas City, Kansas
Posts: 1,518
Thanks: 0
Thanked 2 Times in 2 Posts
Antoniohawk will become famous soon enough
Can we see the code from the page you are talking about?
Antoniohawk is offline   Reply With Quote
Old 02-11-2004, 09:40 PM   PM User | #3
Reno CF
Regular Coder

 
Join Date: Jan 2003
Location: West Virginia
Posts: 110
Thanks: 0
Thanked 0 Times in 0 Posts
Reno CF is an unknown quantity at this point
The actual popup would be launched from a regular html page using this snippet:

Code:
<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...

Code:
<html>
<head>
<title>Reunion Pictures</title>
</head>

<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">


<noframes>
<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>
</body></noframes>

</frameset>
</html>
__________________
Reno CF
Reno CF is offline   Reply With Quote
Old 02-11-2004, 10:23 PM   PM User | #4
Roy Sinclair
Senior Coder

 
Join Date: Jun 2002
Location: Wichita
Posts: 3,880
Thanks: 0
Thanked 0 Times in 0 Posts
Roy Sinclair will become famous soon enough
Are you unaware that you can position the window this way:

Code:
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.
__________________
Check out the Forum Search. It's the short path to getting great results from this forum.
Roy Sinclair is offline   Reply With Quote
Old 02-11-2004, 10:49 PM   PM User | #5
Reno CF
Regular Coder

 
Join Date: Jan 2003
Location: West Virginia
Posts: 110
Thanks: 0
Thanked 0 Times in 0 Posts
Reno CF is an unknown quantity at this point
Thanks Roy -- that was exactly what I was hoping to find... works perfectly...
__________________
Reno CF
Reno CF is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 10:22 AM.


Advertisement
Log in to turn off these ads.