DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/index.php)
-   PHP (http://www.daniweb.com/forums/forum17.html)
-   -   Code works with Mozilla, but not with other browsers... (http://www.daniweb.com/forums/thread149574.html)

Mylena Oct 6th, 2008 5:38 pm
Code works with Mozilla, but not with other browsers...
 
Hello,

This is just an extraction from the code.

The code below works really well in Mozilla Firefox, but does not work with the <a> and <font> tags in any other browsers. When I remove <a> and <font> tags, it works in other browsers...

If anyone can spot the problem, I will really appreciate your help.

Sincerely



$vas= $row['Name'];


echo "document.getElementById(\"Layer1\").innerHTML = document.getElementById(\"Layer1\").innerHTML + <font size='3'> <a href = \"#\" onclick=\"ShowPicture('$varr')\" >". $vas ."</a></font>; ";

Mylena Oct 6th, 2008 7:13 pm
Re: Code works with Mozilla, but not with other browsers...
 
Thanks, i just resolved it myself. I missed the single inverted commas...


echo "document.getElementById('Layer1').innerHTML = document.getElementById(\"Layer1\").innerHTML + '<font size=\'3\'><a href=\"#\"  onclick=\"ShowPicture(\'$varr\')\" >".$vas ."</a></font><br />'; ";


All times are GMT -4. The time now is 10:15 pm.

Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC