PDA

View Full Version : click to close window?


Jason
03-18-2003, 02:33 AM
I have a popup that gets displayed when a user selects a URL is there a way I can add a java script so that if the user clicks anywhere in the window the popup closes?


Jason

ez4ne12c
03-18-2003, 02:42 AM
i think if you put an onclick event in the body tage
onClick='javascript:self.close();'
ez

Jason
03-19-2003, 12:33 AM
that didn't work, I added something like

<SCRIPT="JavaScript">
onClick="self.close";
</SCRIPT>

but when I do anything nothing happens...darn window stays open. What do I do?

Jason

Nightfire
03-19-2003, 01:32 AM
Sure you put it in the body tag?

<body onClick='javascript:self.close();'>

Jason
03-19-2003, 01:46 AM
oops, my mistake, I had it just above the body tag. Thanks for the clarification you two.


Jason