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 3 of 3
  1. #1
    New Coder
    Join Date
    Nov 2006
    Posts
    18
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Merging fullscreen popup script with another script

    Hello all..

    I am using this script which openes a page with frames in a popup window with a set page-size.

    Code:
    function search2(item){
            stringPlus();
            resultsWindow=window.open('', 'SSearch', 'toolbar=yes,location=no,directories=no,status=yes,menubar=yes,width=1000,height=680,resizable=1,scrollbars=auto');
            resultsWindow.document.open();
            resultsWindow.document.write("<head><title>Images</title></head>");
      resultsWindow.document.write("<FRAMESET ROWS=8%,92% border=0><FRAME NAME='frame0' SRC='" + computeFrameSrc(0) + "'><FRAME NAME='frame1' SRC='" + computeFrameSrc(1) + "'></FRAMESET>");
            resultsWindow.document.close();
            got = 0;
    }

    ..but instead of pre-specified page size, I want the popup to open fullscreen and not hiding the the windows bar below, and I found this script for it.

    http://www.walsh100.force9.co.uk/scripts/popup/full.htm


    But how do I insert the functioning of that script in that frame generating script?

    I cannot use

    Code:
    <a href="javascript:popupWindow('popupwindow.htm')">
    as the popup is generated through an image-submit button with a search form.



    please help!
    thanks.
    Last edited by VatsaL; 12-21-2006 at 06:42 PM.

  • #2
    Senior Coder
    Join Date
    Nov 2006
    Posts
    1,000
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I'm not sure if what you are asking is more complicated than what I'm thinking. So you just want the size to vary? Anyway, something like this?

    Code:
    function search2(item){
    
        var winWidth = 400; // sets a default width for browsers who do not understand screen.width below
        var winHeight = 400; // ditto for height
    
        if (screen) { // weeds out older browsers who do not understand screen.width/screen.height
           winWidth = screen.width;
           winHeight = screen.height;
        }
    	
        stringPlus();
        resultsWindow=window.open('', 'SSearch', 'toolbar=yes,location=no,directories=no,status=yes,menubar=yes,resizable=1,scrollbars=auto,width='+winWidth+',height='+winHeight+',left=0,top=0');
        resultsWindow.document.open();
        resultsWindow.document.write("<head><title>Images</title></head>");
        resultsWindow.document.write("<FRAMESET ROWS=8%,92% border=0><FRAME NAME='frame0' SRC='" + computeFrameSrc(0) + "'><FRAME NAME='frame1' SRC='" + computeFrameSrc(1) + "'></FRAMESET>");
        resultsWindow.document.close();
        resultsWindow.focus();
        got = 0;
    }
    david_kw

  • #3
    New Coder
    Join Date
    Nov 2006
    Posts
    18
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hey worked perfectly, it was what I wanted.

    Thanks!


  •  

    Posting Permissions

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