Web Analytics Made Easy -
StatCounter Moving frameset to right onload - CodingForum

Announcement

Collapse
No announcement yet.

Moving frameset to right onload

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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

  • #2
    Can we see the code from the page you are talking about?

    Comment


    • #3
      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

      Comment


      • #4
        Are you unaware that you can position the window this way:

        Code:
        window.open('alumni.html', 'popup', '[b]top=20,screenX=20,left=200,screenY=200,[/b]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.

        Comment


        • #5
          Thanks Roy -- that was exactly what I was hoping to find... works perfectly...
          Reno CF

          Comment

          Working...
          X