[Javascript] Newbie Question - Passing Variables

Filipiak, Bob (Contractor) filipiab at atsc.army.mil
Mon Mar 19 09:20:32 CST 2001


Suggest you concatenate:
function popUp(URL,wth,hgt) {
day = new Date(); 
id = day.getTime();
var tmpStr;
tmpStr = "toolbars=0, scrollbars=0, location=0, statusbars=0, menubars=0,
resizable=0, width=" + wth + ", height=" + hgt + """;

eval("page" + id  = window.open(URL, '"' + id + '"' + tmpStr));
}

-----Original Message-----
From: rchadwe1 at tampabay.rr.com [mailto:rchadwe1 at tampabay.rr.com]
Sent: Monday, March 19, 2001 10:11 AM
To: javascript at LaTech.edu
Subject: [Javascript] Newbie Question - Passing Variables


function popUp(URL,wth,hgt) {
day = new Date(); 
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbars=0, 
scrollbars=0, location=0, statusbars=0, menubars=0, resizable=0, 
width= + wth + , height= + hgt + ');");

I am trying to pop up a window using variables to determine window 
size.  Trying to create a generic pop up script.  I can't get it to 
recognize the wth and hgt variables.  Can you help me? hep me hep me.

Thanks

Rob


_______________________________________________
Javascript mailing list
Javascript at LaTech.edu
http://www.LaTech.edu/mailman/listinfo/javascript
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.evolt.org/pipermail/javascript/attachments/20010319/647482cb/attachment.htm>


More information about the Javascript mailing list