d22552000 Posted November 25, 2007 Share Posted November 25, 2007 <a href="javascript:window.open('splay.php?id=1871032','Play Song','height=100,width=300,resizable=no,scrollbars=no,toolbar=no,status=no');"> no matter what I do, it alwasy says: Line: 1 Char: 1 Error: Invalid Argument Code: 0 Please help me >< I am getting fed up with JS. Quote Link to comment Share on other sites More sharing options...
phpQuestioner Posted November 25, 2007 Share Posted November 25, 2007 do it this way: <a href="javascript:void(0)" onclick="javascript:window.open('splay.php?id=1871032','Play Song','height=100,width=300,resizable=no,scrollbars=no,toolbar=no,status=no')">click me</a> Quote Link to comment Share on other sites More sharing options...
d22552000 Posted November 25, 2007 Author Share Posted November 25, 2007 not working. now im using this: but it give different errors: **PAGE HEADER STUFF AND CSS** <script language="javascript" type="text/javascript"> function popitup(url) { newwindow=window.open(url,'?','height=100,width=300,resizable=no,scrollbars=no,toolbar=no,status=no'); if (window.focus) {newwindow.focus()} return false; } </script> </head> ** PAGE BODY STUFF ** <a href='play.php?id=2318454' onclick="return popitup('splay.php?id=2318454');"> ** PAGE BODY STUFF ** Now, this works fine in forefox, opens the popup and ignores the href because it returned false. BUT IN IE 7 this gives me 1 error and goes to the HREF. Line: 30 Char: 2 Error: Invalid Argument Code: 0 Line 30 is the <A href thing Quote Link to comment Share on other sites More sharing options...
phpQuestioner Posted November 26, 2007 Share Posted November 26, 2007 you can do that like this: <script language="javascript"> function popitup(url) { window.open(url,'Play_Song','height=100,width=300,resizable=no,scrollbars=no,toolbar=no,status=no'); } </script> </head> <body> <a href="play.php?id=2318454" onclick="popitup('splay.php?id=1871032'); return false">click here</a> or............ like this: <a href="play.php?id=2318454" onclick="javascript:window.open('splay.php?id=1871032','Play_Song','height=100,width=300,resizable=no,scrollbars=no,toolbar=no,status=no'); return false">click me</a> the error is probably happening because; in the pop-up name; "Play Song" is not connected. you need to make sure that the pop window name is not separated. see if that fixes the error; because the code I have given you has been tested in IE6, IE7, and FFv2.0.0.4; it works perfectly fine. also, if the file does not exist some where in your directory; your may get an error too. i would suggest that you also download FireBug; it is a FireFox Add-On, that will help you find simple errors in your JS and HTML files. Quote Link to comment Share on other sites More sharing options...
d22552000 Posted December 1, 2007 Author Share Posted December 1, 2007 this error only shows in the shithole of the internet, ie7. but my site needs to be cross compatible. Your code gives me the same thing... lol. Quote Link to comment Share on other sites More sharing options...
phpQuestioner Posted December 1, 2007 Share Posted December 1, 2007 d22552000; I use the exact code below in a site that I have designed and it is compatible with IE7. <a href="javascript:void(0)" onclick="window.open('ics.php?id=13','slideshow','resize=no,scrollbar=yes,menubar=no,directories=no,statusbar=no,width=502,height=398,toolbar=no,top=0,left=0')">View Slideshow</a> Quote Link to comment Share on other sites More sharing options...
d22552000 Posted December 3, 2007 Author Share Posted December 3, 2007 yay this works in ie7 now, thank you VERY much. Maybe the javascript:void did it, I have not a clue but THANK YOU! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.