Click to See Complete Forum and Search --> : Usinf onClick to open a new window


Durbs
08-23-2004, 06:53 PM
I need a window to open in response to a button being clicked. Here's wot i cam up with but it doesn't want to work for some reason: <input type="button" value="Add Images" onclick="window.open('addimage.php', 'Add image', 'width=100, height=120, toolbar=0, menubar=0, status=0');" /> All i get when the button is pressed is 'error on page'.

Cheers,
Durbs

David Harrison
08-23-2004, 07:15 PM
The second arguement is supposed to be the window name (for use with depreciated target attribute), therefore you cannot have a spance in it.<input type="button" value="Add Images" onclick="window.open('addimage.php', 'Addimage', 'width=100, height=120, toolbar=0, menubar=0, status=0');" />