I'm trying to create a button which would open another page in a new browser window, but I am having hard time with the javascript window.open -method. What is the correct syntax? Is it a problem with quotation marks? This is the script which just doesn't work: echo "<form>"; echo "<input type='button' value='open new window' onClick='newWin=window.open('anotherPage.php','newWin','width=200 height=100');'>"; echo "</form>";
echo '<input type="button" value="open new window" onClick="newWin=window.open(\'anotherPage.php\',\'newWin\',\'width=200 height=100\');">'; PHP: Have a look at this page: http://www.php.net/manual/en/language.types.string.php