SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Hybrid View

  1. #1
    SitePoint Enthusiast
    Join Date
    Aug 2002
    Location
    Burnaby, BC
    Posts
    84
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    OnSubmit - Allowing for Scroll Bars on popup window??

    What do I add to this ONSUBMIT script so it makes the popup window allow for SCROLL BARS if it's too high?

    <FORM METHOD="POST" ACTION="http://www.camarosource.ca/list_the_rpos.php" name="form_rpo" onSubmit="postToPopup(500,335,this)">

    I have a RPO code decoder. which when you click a Forum Submit button, a new window pops up and displays all the decoded RPO Codes into a new popup window. The WIDTH of the window is 335pixels, however the HEIGHT is currently set at 500pixels. The problem is that the page can EASILY and most of the time is, LARGER than this height. As a result the information below 500pixels is hidden. I want to be able to pop up scroll bars IF it's larger than 500pixels.

    Someone posted that script above to me. But I never could figure out what the "postToPopup(500,335,this)"> statement, the "this" is for?? Obviously "500" is for a set height, 335 for set width.. but "this"?

    And of course HOW to make the height NOT set so it allows scroll bars. Thanks

  2. #2
    SitePoint Wizard Pepejeria's Avatar
    Join Date
    Jan 2005
    Location
    Too far up north
    Posts
    1,566
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    How does the postToPopup function look like?

  3. #3
    SitePoint Enthusiast
    Join Date
    Aug 2002
    Location
    Burnaby, BC
    Posts
    84
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Pepejeria View Post
    How does the postToPopup function look like?
    <script language="JavaScript" type="text/javascript">
    function postToPopup(w,h,f) {
    n = f.name;
    window.open("javascriptpener.document." + n + ".submit()", f.target = 'wnd' + n, 'width=' + w + ',height=' + h);
    return false;
    }
    </script>


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
  •