The onClick Command
4 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Charissa_Lim
Posted On:   Sunday, September 15, 2002 06:52 PM

I have in my code, an onClick command like this: onClick="openWin('www.website.com/Link.jsp)" that calls on the javascript: var urlLocation; var newWindow; var myBars = 'toolbar=0, location=0, directories=0, status=1, menubar=0, titlebar=1'; var myOptions = 'scrollbars=1, resizable=1, width=760, height=550'; var myFeatures = myBars + ',' + myOptions; var urlLocation=val; newWindow = window.open('https://' + urlLocation, 'win', myFeatures); } ]]>]]> My question is, if I click the image twice simultaneously using Internet Explorer, one pop up window opens. However, if I use Netscape and do the same, two pop up windows open. In Netscape, the number of    More>>


I have in my code, an onClick command like this:


onClick="openWin('www.website.com/Link.jsp)"


that calls on the javascript:





My question is, if I click the image twice simultaneously using Internet Explorer, one pop up window opens. However, if I use Netscape and do the same, two pop up windows open. In Netscape, the number of clicks is the number of windows that pops up unlike in Internet Explorer where only one window pops up no matter how many times I click. Is there a way where I can control the number of windows that opens when using Netscape?


Thanks.

   <<Less

Re: The onClick Command

Posted By:   Charissa_Lim  
Posted On:   Thursday, September 19, 2002 12:52 AM


Hello guys. Thanks for the replies. I tried your suggestions but they didnt work. It seems that Netscape is unable to detect the value of newWindow right away if I click twice simultaneously because if I click at an interval, it goes in the else part of the script which is the window focus. Are there some other ways? Thanks in advance.

Re: The onClick Command

Posted By:   Firat_Tiryaki  
Posted On:   Tuesday, September 17, 2002 03:38 AM

avoid using white spaces with window.open method. Netscape has some probles with parsing the method's options including white spaces

Re: The onClick Command

Posted By:   Nitesh_Naveen  
Posted On:   Monday, September 16, 2002 03:03 AM

Try this out...


Re: The onClick Command

Posted By:   glen_stormbind  
Posted On:   Monday, September 16, 2002 02:07 AM

I suck at JS but if the window had a unique name, then each additional window (with the same name) would replace the contents of the original window, instead of opening a new window.



I think you can give your window a name by changing the line:



newWindow = window.open('https://' + urlLocation, 'win', myFeatures);



to

newWindow = window.name.open('https://' + urlLocation, 'win', myFeatures);



Sorry I replied. Probably just messed everything up :(
Wish someone would fix my JS problem.
About | Sitemap | Contact