...

View Full Version : Merging fullscreen popup script with another script



VatsaL
12-20-2006, 08:59 PM
Hello all..

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


function search2(item){
stringPlus();
resultsWindow=window.open('', 'SSearch', 'toolbar=yes,location=no,directories=no,status=yes,menubar=yes,width=1000,height=680,resizable=1,scr ollbars=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


<a href="javascript:popupWindow('popupwindow.htm')">

as the popup is generated through an image-submit button with a search form.



please help!
thanks.

david_kw
12-21-2006, 06:51 AM
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?



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='+w inWidth+',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

VatsaL
12-21-2006, 11:26 AM
Hey worked perfectly, it was what I wanted.

Thanks!



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum