a1amattyj Posted July 8, 2008 Share Posted July 8, 2008 hello, This in head: <SCRIPT LANGUAGE="JavaScript"> function load() { var load = window.open('help.php','','scrollbars=no,menubar=no,height=300,width=400,resizable=no,toolbar=no,location=no,status=no'); } </SCRIPT> Then <a href="javascript:load()">Click</a> However, is it possible i can specify the section of help.php which will be opened? For example.. <SCRIPT LANGUAGE="JavaScript"> function load($imguessing) { var load = window.open('help.php?THING=$imguessing','','scrollbars=no,menubar=no,height=300,width=400,resizable=no,toolbar=no,location=no,status=no'); } </SCRIPT><a href="javascript:load(section1)">Click</a> Thanks Link to comment https://forums.phpfreaks.com/topic/113816-java-windowopen/ Share on other sites More sharing options...
lemmin Posted July 8, 2008 Share Posted July 8, 2008 Yeah, get rid of the $'s and that is how you accept input into functions. You need to concatinate the variable in the string, though: window.open('help.php?THING='+$imguessing,'','scrollbars'... Link to comment https://forums.phpfreaks.com/topic/113816-java-windowopen/#findComment-584906 Share on other sites More sharing options...
a1amattyj Posted July 9, 2008 Author Share Posted July 9, 2008 Thanks for the reply. So i guess i use this: <SCRIPT LANGUAGE="JavaScript"> function load($imguessing) { var load = window.open('help.php?THING='+$imguessing,'','scrollbars=no,menubar=no,height=300,width=400,resizable=no,toolbar=no,location=no,status=no'); } </SCRIPT> However, when i click the link, it doesn't pop it up. Any ideas? Thanks Link to comment https://forums.phpfreaks.com/topic/113816-java-windowopen/#findComment-585174 Share on other sites More sharing options...
lemmin Posted July 9, 2008 Share Posted July 9, 2008 Like I said, get rid of the $'s. I accidently left one in the code I copied from yours. <SCRIPT LANGUAGE="JavaScript"> function load(imguessing) { var load = window.open('help.php?THING='+imguessing,'','scrollbars=no,menubar=no,height=300,width=400,resizable=no,toolbar=no,location=no,status=no'); } </SCRIPT> Link to comment https://forums.phpfreaks.com/topic/113816-java-windowopen/#findComment-585468 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.