SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Zealot
    Join Date
    Apr 2003
    Location
    Texas, USA
    Posts
    139
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    What am I doing wrong?

    Hello,

    The following popup works fine, but the popup window doesn't have a scrollbar. Check the script below:

    Code:
    <script language='javascript'>
     <!--
     /******************************
     Generated by:
     a1.com
     *******************************/
     var WSGPoPuPWindow=null;
     function WSGPoPuP(mypage,myname,w,h,pos,infocus){
     if(pos=='center'){
     LeftPosition=(screen.width)?(screen.width-w)/2:100;
     TopPosition=(screen.height)?(screen.height-h)/2:100;}
     else {LeftPosition=5;TopPosition=5;}settings='width='+ w + ',
    height='+ h + ',top=' + 
    TopPosition + ',left=' + LeftPosition + ',location=no,
    directories=no,menubar=no,
    toolbar=no,status=no,scrollbar=yes,resizable=yes,dependent=no';
     WSGPoPuPWindow=window.open('',myname,settings);
     if(infocus=='back'){WSGPoPuPWindow.blur();WSGPoPuPWindow.
    location='http://www.yahoo.com';
    WSGPoPuPWindow.blur();}
     if(infocus=='front'){WSGPoPuPWindow.focus();WSGPoPuPWindow.
    location='http://www.yahoo.com';}
     }
     //-->
     </script>
    As you can see, I specified scrollbars as "yes", yet the popup window doesn't have a scroll bar. What am I doing wrong?

    Thanks for your help

  2. #2
    SitePoint Wizard
    Join Date
    Mar 2002
    Location
    Bristol, UK
    Posts
    2,240
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Change:

    scrollbar=yes

    to:

    scrollbars=yes

    and I think it might work

    Hope this helps!

    -Sam
    Sam Hastings

  3. #3
    Web-coding NINJA! silver trophy beetle's Avatar
    Join Date
    Jul 2002
    Location
    Dallas, TX
    Posts
    2,900
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You say you set scrollbars, but in the code you attempt to set scrollbar. The option is plural, so just add the 's' and you're set.
    beetle a.k.a. Peter Bailey
    blogs: php | prophp | security | design | zen | software
    refs: dhtml | gecko | prototype | phpdocs | unicode | charsets
    tools: ide | ftp | regex | ffdev




  4. #4
    SitePoint Wizard
    Join Date
    Mar 2002
    Location
    Bristol, UK
    Posts
    2,240
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by beetle
    You say you set scrollbars, but in the code you attempt to set scrollbar. The option is plural, so just add the 's' and you're set.
    Beat you

    -Sam
    Sam Hastings

  5. #5
    SitePoint Wizard silver trophy Crazybanana's Avatar
    Join Date
    Mar 2003
    Location
    In tha fruit cellar
    Posts
    1,379
    Mentioned
    32 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by Devilware.net
    Beat you [img]images/smilies/tongue.gif[/img]

    you guys are funny
    Who's to doom when the judge himself is dragged before the bar



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
  •