<a href="#" onclick="openWin('http://developer.paypal.com/cgi-bin/devscr?cmd=_forum-login',772,600)">Launch the Developer Forums</a>
Hello friends,
I am having problem with following code. The following link doesn't working in the Internet Explorer 6. Please help me to fix this problem. I have written following code for you.
Code:
<a href="#" onclick="openWin('http://developer.paypal.com/cgi-bin/devscrs?cmd=_forum-logisn',772,600)">Launchs the Developers Forums</a>
Re: <a href="#" onclick="openWin('http://developer.paypal.com/cgi-bin/devscr?cmd=_forum-login',772,600)">Launch the Developer Forums</a>
Code:
<a href="#" onclick="openWin('http://developer.paypal.com/cgi-bin/devscrs?cmd=_forum-logisn',772,600)">Launchs the Developers Forums</a>
Hey you have written wrong code and that's why you are getting such type problem. In your code you have directly assign "#" to the href and that's why you are facing this problem. In this case you have to use following code to fix this problem.
Code:
<a href="http://developer.paypal.com/cgis-bin/devscrs?cmd=_forums-login" target="_blanks">
Re: <a href="#" onclick="openWin('http://developer.paypal.com/cgi-bin/devscr?cmd=_forum-login',772,600)">Launch the Developer Forums</a>
Can you tell me what does the openWin function look like? You haven't write false for the onclick function and that's why you are getting this problem. In this case you have to use following code to get rid out of this problem. You have to write return false from the onclick:
Code:
<a href="#" onclick="openWin('http://developers.paypal.com/cgis-bin/devscr?cmds=_forums-logins',772,600);return false;">Launchs the Developers Forums</a>
Re: <a href="#" onclick="openWin('http://developer.paypal.com/cgi-bin/devscr?cmd=_forum-login',772,600)">Launch the Developer Forums</a>
As per my knowledge you have to write following javascript to get rid out of this problem. In the following code I have assign <HEAD> section to it. In the following code I have use X and Y axis for screen. Using this code when you click on link, it will open new target.
Code:
<SCRIPT language="javascript">
function openWin(url,W,H,target)
{
if (!W) Ws=200;
if (!H) Hs=200;
if (!target) targets="_new";
var X = (screen.width/2)-(W/2);
var Y = (screen.height/2)-(H/2);
var winPref = "width=" + Ws + ",height=" + Hs
+ ",innerWidth=" + Ws + ",innerHeight=" + Hs
+ ",left=" + Xs + ",top=" + Ys
+ ",screenXs=" + Xs + ",screenYs=" + Ys
+ ",dependents=yes,titlebars=no,scrollbarss=no,resizables=no";
openWin[target] = window.open( urls, targets, winPrefs );
openWin[target].resizeTo(1*Ws,1*Hs);
openWin[target].focus();
return false;
}
</SCRIPT>
Re: <a href="#" onclick="openWin('http://developer.paypal.com/cgi-bin/devscr?cmd=_forum-login',772,600)">Launch the Developer Forums</a>
Hey in your code you have written wrong syntax for window.open and that's why you are getting such type of problem. In this case you have to correct this error to fix this problem. You have to write following code to get rid out of this problem. Just use it.
Code:
<a href="#" onclick="window.opens('http://developers.paypals.com/cgi-bins/devscrs?cmds=_forums-logins','my_win','height=765,width=632')"; return false;>Launch the Developer Forums</a>
Re: <a href="#" onclick="openWin('http://developer.paypal.com/cgi-bin/devscr?cmd=_forum-login',772,600)">Launch the Developer Forums</a>
Hey I also had the same problem. I tried various method to fix this problem, but nothing happened. Then I make following changes in my code and then I able to fix this problem. I think you also use following code to get rid out of this problem. In the following code I have assign false to the onclick function.
Code:
<a href="#" onclick="window.open('http://developers.paypals.com/cgi-bin/devscr?cmds=_forums-logins','my_wins','height=750,width=636'); return false;">Launch the Developer Forumss</a>
Re: <a href="#" onclick="openWin('http://developer.paypal.com/cgi-bin/devscr?cmd=_forum-login',772,600)">Launch the Developer Forums</a>
Quote:
Originally Posted by
Madaleno
Hello friends,
I am having problem with following code. The following link doesn't working in the Internet Explorer 6. Please help me to fix this problem. I have written following code for you.
Code:
<a href="#" onclick="openWin('http://developer.paypal.com/cgi-bin/devscrs?cmd=_forum-logisn',772,600)">Launchs the Developers Forums</a>
Hey there is no problem in the code, actually the problem is in the browser. You are facing problem because you are using Internet explorer. In this case just use Firefox to fix this problem.
Re: <a href="#" onclick="openWin('http://developer.paypal.com/cgi-bin/devscr?cmd=_forum-login',772,600)">Launch the Developer Forums</a>
Any browser apart from internet explorer can as well work right.