Hey guys!! I have been a programmer in other languages for a year now. However, none have been web based. As a result I am learning javascript. You may not appreciate such a simple question... but I can't see my error... I have tried searching and finding alternatives to the problem, but have been unable to locate its roots. The function is a simple one, but one that could be useful to me later. The idea is that I have a simple code that will not be too long, that launches a confirmation box before taking the user to an external link:
and then in the body it can be called as an anchor using:
So far I can see that it launches the function, and the confirm box. So the problem is with opening the window. I have checked the params etc... so what am I doing wrong? or is it a problem with the browser notrecognizing the command? I doubt it! Firefox 3.5, winxp pro sp3
From what I can see you guys have a very nice setup here! Thanks a lot, and I hope I haven't been stupid!
MDiesel
Code:
<script type="text/javascript">
function _externallink(href)
{
if(confirm('About to open an external link. Continue?')=true)
{
window.open(href,'_Blank','',true)
}
}
</script>
and then in the body it can be called as an anchor using:
Code:
<a href="javascript:_externallink('[URL unfurl="true"]http://www.google.com');">link</a>[/URL]
So far I can see that it launches the function, and the confirm box. So the problem is with opening the window. I have checked the params etc... so what am I doing wrong? or is it a problem with the browser notrecognizing the command? I doubt it! Firefox 3.5, winxp pro sp3
From what I can see you guys have a very nice setup here! Thanks a lot, and I hope I haven't been stupid!
MDiesel