Click to See Complete Forum and Search --> : New Windows


IxxI
01-27-2003, 02:24 PM
I'm running a program that opens a new window to display some results. Unfortunately while that window is open I can't rerun the program as it tries to open it to the same window name. Is there a way I can randomize the window name so I can open multiple windows? If it helps this is the code I'm using to open the new window:

output = window.open ("","outputwindow",config)

Thanks,
IxxI

Jona
01-27-2003, 06:44 PM
Could you post a little bit of the code that says...

output.document.write("<HTML>");

etc.?

IxxI
01-28-2003, 03:18 AM
Its OK I've done it. If the window was open it wouldn't reopen, and I needed the output window left open and another output window openning. I've just done it using random numbers. Not very nice I'm sure, but its the first time I've used Javascript and it works. Here's the code so you can criticise its messiness though!

random_num = (Math.round((Math.random()*901)+1))

config='toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,'
config += 'scrollbars=yes,resizable=yes'
output = window.open ("",random_num,config)
output.document.write('<title> Search Results </title>');
output.document.write('<BODY bgcolor=#000000 text=#ffffff link=#990099 vlink =#339966 >');

output.document.write('<center> <h1>Search Results </h1></center>');

etc.
IxxI

Jona
01-28-2003, 01:08 PM
Yea, that works. :)