View Full Version : close and open dhtml window using same variable name

04-09-2008, 08:54 AM
1) Script Title: DHTML Window widget (v1.1)

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex8/dhtmlwindow/

3) Describe problem: hi, i need to reopen the dhtml window that i closed before using same variable name (because i'm gonna use this variable name further), here is my code

function opennewwindow(targetname)
if (!infowindow[targetname])
function deleteinfowindow(targetname)
delete infowindow[targetname];

but when i close the dhtml window
and then reopened it (say i'm using a link to run the function opennewwindow('abcd'))
then the variablename should be infowindow['abcd'] right?
but i cannot access that variable, that variable doesn't exist like the first time i open that dhtml window using that name

anyone can help?

04-09-2008, 10:32 AM
ok sorry, my bad, i made a silly mistake
i shouldn't have used setInterval :p
i should have used setTimeout..
btw thx anyway