hai ,<BR><BR>i got a problem with ie and netscape.. I got 2 windows where the second window will appear automatically and <BR>when i click the button on the first window it should show the second window if it is not open<BR>if it is open it should focus that window.<BR>Now what is my problem is i used try and catch for handling the focus. It is working fine in<BR>ie not in netscape, so i tried if else statement in netscape and wrote a function for that <BR>but when iam running that in netscape it is saying try is a reserve identified for netscape.<BR>here is the code for it; Can anyone of you tell why iam getting this problem. The click button is working in i.e. if i use only<BR>focusActiveIE function, and is working in netscape if i use the function focusActiveNS. i want the button to work in both environments.<BR>please help me.<BR><BR><BR>"""for detecting the browser:"""<BR>function bName()<BR>{<BR>// return 1 for Internet Explorer<BR>if (navigator.appName == "Microsoft Internet Explorer")<BR>return 1;<BR><BR>// return 2 for Navigator<BR>if (navigator.appName == "Netscape")<BR>return 2;<BR>// return 0 for other browser<BR>return 0;<BR>}<BR><BR><BR>""""for ie the function is:""""<BR><BR>function focusActiveIE() <BR>{<BR>if (bName() == 1) <BR>{<BR>try { <BR>tempWin.focus(); <BR>}catch(e) {<BR>window.onload(); <BR>}<BR>}<BR>}<BR><BR><BR>"""for netscape the function is:"""<BR><BR>function focusActiveNS()<BR>{<BR>if (tempWin.opener)<BR>{<BR>tempWin.focus();<BR>}<BR> else<BR>{<BR>window.onload();<BR><BR>}<BR>}<BR><BR >""""i gave in html like this:"""<BR>&#060;script language="javascript"&#062;<BR>&#060;!--<BR><BR>document.write(&#039&#060;form&#062;&#039) ;<BR><BR>if (bName() == 1)<BR>document.write(&#039&#060;input type="button" id="button1" name="button" value="Click Here to enter Casino" onClick="JavaScript:focusActiveIE();"&#062;&#039); <BR><BR>if (bName() == 2)<BR>document.write(&#039&#060;input type="button" id="button1" name="button" value="Click Here to enter Casino" onClick="JavaScript:focusActiveNS();"&#062;&#039); <BR><BR>document.write(&#039&#060;/form&#062;&#039);<BR>//--&#062; <BR>&#060;/script&#062;<BR><BR><BR><BR>