I have some javascript (onClick) that won't work in php when I echo it?

Deji

New member
I successfully did this in my HTML and it worked

<html>

<a href=''><img src="images/Template.jpg" onClick="javascript: this.src='images/ps3.jpg' onClick="javascript: this.src='images/ps3.jpg';" /></a>

</html>

I then tried echo the same thing in PHP.

<?php

echo "<img src='images/Template.jpg' onClick='javascript: this.src='images/ps3.jpg;';' onClick='javascript: this.src='images/ps3.jpg';' title='Click here to see more details'> </a>";

?>

Only the Template.jpg image shows and the onClick command doesn't work.

Someone please help!
 
Back
Top