views:

23

answers:

1

So I'm having a popup that opens upon click on a link, but IE (8.0) doesnt want to show it.

<a href="javascript:tellafriend('tellafriend.php?id=<?php echo $obj_id; ?>');">Send page</a>

And this function in JS:

  function tellafriend(url) {
    popup = window.open(url, "Send page", "width=500,height=600,scrollbars=yes,resizable=yes");
    popup.focus();
  }

IE tells me the error is at the line popup = window.open...

Any ideas on how to fix it?

+1  A: 

I can't tell you why this happens, but IE doesn't let you have a space in the second parameter of window.open. If you change it to

popup = window.open(url, "Sendpage", "width=500,height=600,scrollbars=yes,resizable=yes");

the window will pop up.

Paul Spangle
FYI, `send-page` also doesn't work. Seems like it only opens when alphanumerics are set... That's why IE should be banned -.-"
ApoY2k