Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Oct 2002
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    pop-up window size

    I have a query on the following script in which the 'maximise' button is greyed out in the pop-up window. I need to be able to allow the window to be either maximised or resized to allow for different content width/height (i.e. one use of the pop-up is for a flash video presentation which is currently cut in half. Any advice would be appreciated:

    <script language="Javascript">
    <!--
    // Hide from old browsers
    var p,MyPopup;

    MyPopup=0;



    // Call this as following example
    // Note use of single and double quotes
    // <a href="javascript:PopWin('xxxx.html')"

    function PopWin(fname){

    if (MyPopup && !MyPopup.closed) // if already open then close it
    MyPop.close();

    p="top=0,left=0,Width="; // set top and left start points
    p += (screen.width-470); // adjust width here
    p += ",height=";
    p += (screen.height-130); // adjust height here
    p += ",scrollbars=yes";
    MyPopup = window.open(fname, 'mypage', p); // opens the file 'fname' and gives it a name
    }
    // End hide from old browsers
    -->
    </script>

    Bill

  • #2
    Regular Coder
    Join Date
    Jun 2002
    Posts
    166
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Should work.

    p += ",scrollbars=yes,resizable=yes";

  • #3
    New to the CF scene
    Join Date
    Oct 2002
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks, Paulette. Just as an extra query can you confirm that the default on all conditions such as 'scrollbars'; 'resizable'; etc is NO if the condition isn't specifically written into the script (as was the case with 'resizable' in this script).

  • #4
    New to the CF scene
    Join Date
    Oct 2002
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Sorry, I should have been asking about attributes rather than conditions. Also a quick check of the tutorials at javascriptkit suggests that if the attribute isn't included in the script it does default to OFF.


  •  

    Posting Permissions

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