View Full Version : inner.html syntax

04-14-2005, 10:52 PM
I understand from some other posts that the reason I'm having problems with Firefox displaying a code I have with an inner html reference has to do with syntax.

Below is a snippet of the code I am using.
<a onmouseover="info.innerHTML = '&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt; \'And on their way, they met a grey bearded man.&lt;/div&gt;'">Landscaping</a><br>

Could someone please inform me as to the correct language to use to get this to show up in a div I have set up? I would appreciate it a lot.

Nevermind, I used some other code I found in another post and was able to adjust it to my needs. Thanks for being here anyways :)

04-14-2005, 10:58 PM
any special character you want to use like quotes just do so:

blah.innerHTML="<br>the boy said, \" blah blah blah\"";

use the \ infront of the special characters
and as long as the <>'s are within the quotes of the innerHTML you dont have to convert them you can type just as they are

04-14-2005, 11:03 PM
Whats the problem with it? I tried it out, and it seems to work?

04-15-2005, 02:15 PM
It worked fine in IE, just not firefox. I changed my code to
<a onmouseover="document.getElementById('info').innerHTML =

and it works fine in both now.

Thanks for your comments and help.

04-15-2005, 04:07 PM
I tried your original code in firefox, and it worked for me. :thumbsup: