window.open -method and php

Discussion in 'PHP' started by tikitin, Aug 19, 2007.

  1. #1
    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>";
     
    tikitin, Aug 19, 2007 IP
  2. nico_swd

    nico_swd Prominent Member

    Messages:
    4,153
    Likes Received:
    344
    Best Answers:
    18
    Trophy Points:
    375
    #2
    nico_swd, Aug 19, 2007 IP