Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 4 of 4
  1. #1
    Member dsmflash's Avatar
    Join Date
    Jan 2007
    Location
    Indiana
    Posts
    40
    Member #
    14695
    I am using the following script for a centered popup window:

    var win = null;
    function NewWindow(mypage,myname,w,h,scroll){
    LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
    TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
    settings =
    'height='+h+',width='+w+',top='+TopPosition+',left ='+LeftPosition+',scrollbars='+scroll+',resizable'
    win = window.open(mypage,myname,settings)
    }

    The script works perfect, except I need to be able to turn resize on or off in my HTML.
    My question is how do I turn off the "resizable" setting in my html:
    onclick="NewWindow(this.href,'name','850','650','y es');return false"

    I've tried ...'yes','no');return false", etc. with no luck.

    Any help appreciated.

  2.  

  3. #2
    Senior Member
    Join Date
    May 2003
    Location
    UK
    Posts
    2,354
    Member #
    1326
    You need to set resizable to 0.

    Code:
    var win = null;
    function NewWindow(mypage,myname,w,h,scroll){
    LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
    TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
    settings =
    'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars=' +scroll+',resizable=0'
    win = window.open(mypage,myname,settings)
    }

  4. #3
    Member dsmflash's Avatar
    Join Date
    Jan 2007
    Location
    Indiana
    Posts
    40
    Member #
    14695
    thanks for the reply, but that's now my issue. I know how to turn off resizable in the javascript function, but I need to know how to make it an option in the function but turn it off as needed in the html. i want it to be on by default, but be able to turn it off when needed.

    what do I put in the html part to turn it off?

    thanks

  5. #4
    Senior Member
    Join Date
    May 2003
    Location
    UK
    Posts
    2,354
    Member #
    1326
    I am not sure I follow you.

    You cannot turn it off in the HTML as you do not use HTML to create the popup window, you use JavaScript.


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 05:31 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com