"Steve Yates" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > "Prachi Shroff" <[EMAIL PROTECTED]> wrote in message > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > the link just says > > javascript:window.open( > > Why would that happen? > > > R'twick Niceorgaw <[EMAIL PROTECTED]> wrote: echo " > href=\"javascript:window.open(\"addfossilpage.php?me=$folder_id\",\"width=43 > > 0\",\"height=450\" )\">"; > > Count your quotes...your string is > > href="javascript:window.open(" > > At that second quote your string ends. Use single quotes inside the > doubles, or single quote the entire string and get rid of the slashes. > Something like: > > echo 'href="javascript:window.open("addfossilpage.php?me=' . $folder_id . > '","width=43 0","height=450" )">'; >
prachi, you quote count is correct. you have to realize here that not only php is expecting correct quoting, html and javascript also do. your fault is trying this with plain html <a href="javascript.window.open("addfossilpage.php?me=1")"> which is not correct because of inline quotes in the href attribute. the right version is <a href="javascript.window.open('addfossilpage.php?me=1')"> in consequence, php echoing would be most effective like this echo "<a href=\"javascript:window.open('addfossilpage.php?me=$folder_id','width=430', 'height=450')\">"; note that $folder_id is stated within the string itself, this works because you started the php string with double-quotes. hth ilker -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php