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 7 of 7
  1. #1
    New to the CF scene
    Join Date
    Oct 2006
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Unable to minimize pop up window / window.open

    Hi,

    Unable to minimize the pop up window.
    It can be closed.

    Actual example can be seen:
    http://rakuteapots.com/assets/image_test.html

    The script was provided thanks to the user Spookster listed in the forum:
    Popup Image Viewer


    The problem I am encountering is the user is not able to minimize the popup window. If you try, it will automatically come backup.
    How can that be adjusted?

    The code is:
    Code:
    <!--//
    function imageView(imgFile,imgTitle,imgWidth,imgHeight,winPosX,winPosY){ 
    preview = window.open("","","resizable=no,toolbar=no,scrollbars=no,menubar=no,status=no,directories=no,width="+imgWidth+",height="+imgHeight+",left="+winPosX+",top="+winPosY+"");
    preview.document.write('<html><head><title>'+imgTitle+' - Click to close - <\/title><\/head>'
    +'<body onBlur="self.focus();" marginWidth="0" marginHeight="0" topmargin="0" leftmargin="0">'
    +'<center>'
    +'<a href="javascript:self.close()">'
    +'<img border="0" alt="Image loading please wait...." src="'+imgFile+'" width="'+imgWidth+'" height="'+imgHeight+'">'
    +'<\/a><\/center>'
    +'<\/body><\/html>');
    preview.document.close();
    }
    //-->
    </script>

    Thanks,

    Felix

  • #2
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    You need to change where it says resizable=no to resizable=yes
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #3
    Supreme Overlord Spookster's Avatar
    Join Date
    May 2002
    Location
    Marion, IA USA
    Posts
    6,273
    Thanks
    4
    Thanked 83 Times in 82 Posts
    Actually if you do not want the popup window to retain focus until it is closed then you need to remove this part:

    onBlur="self.focus();"

    I set this up so that the popup image would always be in front until it is closed.
    Spookster
    CodingForums Supreme Overlord
    All Hail Spookster

  • #4
    New to the CF scene
    Join Date
    Oct 2006
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hi _Aerospace_Eng_...

    I made the change, uploaded and tested.

    The window continues bouncing back up when ever the user tries minimizing it.

  • #5
    New to the CF scene
    Join Date
    Oct 2006
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hi Spookster,

    Removed the >> onBlur="self.focus();"

    It resolved the minimizing problem.

    However, the image is not longer occupying the whole window as it did before. How can I keep some of those parameters (and which one) to have the image fill the entire window?

    Thanks

  • #6
    Supreme Overlord Spookster's Avatar
    Join Date
    May 2002
    Location
    Marion, IA USA
    Posts
    6,273
    Thanks
    4
    Thanked 83 Times in 82 Posts
    put back everything except the onBlur part.
    Spookster
    CodingForums Supreme Overlord
    All Hail Spookster

  • #7
    New to the CF scene
    Join Date
    Oct 2006
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hey Spookster...

    I just re-did it... I had removed the entire line including the body parameters... I see now...it makes sense. So I can actually manipulate the body within the pop up window... Cool

    It works perfectly now...Kudos to you... Thank you, thank you...

    Felix
    Last edited by Felixd; 11-01-2006 at 12:48 AM.


  •  

    Posting Permissions

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