embedding javascript in php
Posted: Sat Dec 04, 2010 1:02 am
i want to change the content of my div tag dynamically using javascript in PHP. I am using the following technqiue but it is not working.
<?php
echo "<script type='text/javascript'>\n";
echo "document.getElementById('mydiv').innerHTML = 'contents of div.......';";
echo "</script>";
?>
Plz guide me how can i do this
Thanks,
Best Regards,
Nice Candy.
<?php
echo "<script type='text/javascript'>\n";
echo "document.getElementById('mydiv').innerHTML = 'contents of div.......';";
echo "</script>";
?>
Plz guide me how can i do this
Thanks,
Best Regards,
Nice Candy.