Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 12-20-2006, 08:59 PM   PM User | #1
VatsaL
New Coder

 
Join Date: Nov 2006
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
VatsaL is an unknown quantity at this point
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 05:42 PM..
VatsaL is offline   Reply With Quote
Old 12-21-2006, 06:51 AM   PM User | #2
david_kw
Senior Coder

 
Join Date: Nov 2006
Posts: 1,000
Thanks: 0
Thanked 0 Times in 0 Posts
david_kw will become famous soon enough
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
david_kw is offline   Reply With Quote
Old 12-21-2006, 11:26 AM   PM User | #3
VatsaL
New Coder

 
Join Date: Nov 2006
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
VatsaL is an unknown quantity at this point
Hey worked perfectly, it was what I wanted.

Thanks!
VatsaL is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 06:07 PM.


Advertisement
Log in to turn off these ads.