<script type="text/javascript">
function popUp(obj){
var win=window.open(obj.href,obj.innerHTML,"width=500,height=500");
alert('This test alert will not pop in IE');
win.focus();
return false;
}
</script>
<a href="somepage.html" onclick="return popUp(this)">Some Page</a>
That does not work in my version of IE (IE 6.0, no popup blockers).
It seems like the function returns true at the window.open without
opening a new window. Other browsers are OK.
Is there something I'm overlooking in this stupid little bit of
javascript? Or is my IE broken? Perhaps there's a cleaner way to do this?
Jeff
The thing you are overlooking is the space in the innerHTML of the link.
IE - rightfully - doesn't allow spaces in Window Names and errors out on
it. Firefox is getting it wrong and allowing the space.
--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/index.html
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/