temjin Posted December 2, 2008 Share Posted December 2, 2008 I am having trouble inserting javascript code into my php. I always have trouble with where to place the quotation marks. I have been trying different combinations for hours. I'm sure on of you experts could let point me in the right direction with out even thinking. Here is my code: <? if(year2) { echo "<td><a href="#" onClick=""hideAll();changeDiv('vehicle3','block');">vehicle (3)</a></td>"; }?> Link to comment https://forums.phpfreaks.com/topic/135184-solved-help-should-be-an-easy-fix-javascript-in-php/ Share on other sites More sharing options...
gevans Posted December 2, 2008 Share Posted December 2, 2008 <?php if(year2) { echo "<td><a href=\"#\" onClick=\"hideAll();changeDiv('vehicle3','block');\">vehicle (3)</a></td>"; } ?> Link to comment https://forums.phpfreaks.com/topic/135184-solved-help-should-be-an-easy-fix-javascript-in-php/#findComment-704060 Share on other sites More sharing options...
temjin Posted December 2, 2008 Author Share Posted December 2, 2008 HOLY BEZESUS that was fast. Thanks for that ultra quick reply. It worked. Link to comment https://forums.phpfreaks.com/topic/135184-solved-help-should-be-an-easy-fix-javascript-in-php/#findComment-704064 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.