Jump to content

[SOLVED] php and javascript


squiblo

Recommended Posts

im trying to echo this...

<?php if ($img1) 
	echo "<td width='33.3%' align='center'>
	<FORM>
<INPUT type='button' value='New Window!' onClick="window.open('http://www.pageresource.com/jscript/jex5.htm','mywindow','width=400,height=200')">
        </FORM>
	</td>"; ?>

 

but the quotation marks are giving an error, but if i change the quotation marks to apostrophes then the link does not work, how is this suppose to be wrote out?

Link to comment
https://forums.phpfreaks.com/topic/175269-solved-php-and-javascript/
Share on other sites

try this:

 

if ($img1)

      echo "<td width='33.3%' align='center'>

      <FORM>

<INPUT type='button' value='New Window!' onClick=\"window.open('http://www.pageresource.com/jscript/jex5.htm','mywindow','width=400,height=200')\">

        </FORM>

      </td>";

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.