SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Enthusiast jared's Avatar
    Join Date
    Sep 2001
    Posts
    30
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    resizing the window

    I don't quite understand the resize function.

    I have a popup window with 2 frames. When the popup loads, I would like it to be dynamically resized.

    However, I can't seem to understand the syntax & google searches have provided pages of info, but not enough examples for me to understand.

    popup window looks like this:

    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN">
    
    <html>
      <head>
        <meta name="generator" content="HTML Tidy, see www.w3.org">
    <?php 
    $popup_x=400;
    $popup_y=pic_sizey*2+16+34; 
    ?>
        <title>Ghouls'n Ghosts</title>
      </head>
    
      <frameset rows="36, *" onload="_top.resizeto($popup_x,$popup_y)";>
        <frame name="zoom" src="123.htm" marginwidth="0" marginheight="0" scrolling="no" noresize frameborder="0" framespacing="0">
    
        <frame name="ssf" frameborder="0" framespacing="0" no resize src=<?php echo("\"ss_200.php?ssurl=$ssurl&pic_sizex=$pic_sizex&pic_sizey=$pic_sizey\"");?> marginwidth="0" marginheight="0" scrolling="yes" frameborder="0" framespacing="0">
      </frameset>
    </html>
    As you can see, I've put the onload code into the top frame. However, it gves me an error & then sizes the whole window in the top frame.
    signature

  2. #2
    SitePoint Enthusiast jared's Avatar
    Join Date
    Sep 2001
    Posts
    30
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    nevermind - solved it

    use the window.resizeTo(x,y) function.

    works perfect.

    jared

    yeah, I know, I know -n00b
    signature


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •