Click to See Complete Forum and Search --> : javascript:popUp Window Name


frank.griffin
07-29-2003, 02:49 PM
How can I add a window name to the following Javascript:popup code. I want to add the screen name at the hyperlink level.


Existing Java Code:

<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=1024,height=768,left = 0,top = 0');");
}
// End -->
</script>


Thanks
Frank
<A HREF="javascript:popUp('login_audio.htm')"><strong>Login</strong></A>

Phil Karras
07-30-2003, 11:34 AM
Off the top of my head it looks like you're on the right track.

You might first try replacing the "eval" with "alert" and take a close look at what you're trying to evaluate.

Just an idea. I've done this before but I wasn't changing the var name as well, I don't think.