A couple of things come to mind.&nbsp; First, IIRC, the spec actually says you should *not* use a number for the ID attribute.<br><br>Second, according to your HTML below, the onmouseover event handler should never fire because it's stuck to the attribute before it (and technically the name of the event should be in all lowercase).<br><br>However, neither of these is likely to cause the consistent behavior you've described.&nbsp; Can you show us a sample of the HTML where you're using a string as the id?&nbsp; I would guess it has to do with the fact that your event handler code should have quotes around it just like any other HTML attribute, and you're not switching quote types (i.e. single to double) when delimiting the ID parameter.&nbsp; If you *don't* use quotes around the parameter, then the JS parser will think you're referring to a variable named hint4, which of course does not exist.<br><br>In short, this would be right:<br><br>&lt;a href="#" onmouseover ="toggle_visibility('hint4')"&gt;<br>&lt;img src="../../image/icon_toggle.jpg" width="22" height="22" <br>border="0"&gt;&lt;/a&gt;<br>&lt;span class = "hidden_hint" id="hint4"&gt;<br>Add -&lt;img src="../images/sq_root_7.gif" align="absmiddle"&gt; to both sides<br>of the equation.<br>&lt;/span&gt;<br><br>Does that help?<br><br>Cheers,<br><br>Peter<br><br><font face="Tahoma, Arial, Sans-Serif" size=2><b>From</b>: "Del Wegener" <a href="mailto:del@delweg.com">del@delweg.com</a><br></font><br><span class=ReadMailPlainText>Good Day;<br><br>This is the JavaScript function<br>function toggle_visibility(id)<br>{<br>var e = document.getElementById(id);<br>if(e.style.visibility != 'visible')<br>e.style.visibility = 'visible';<br>else<br>e.style.visibility = 'hidden';<br>}<br><br>This is the HTML which does the calling<br>&lt;a href="#"onMouseOver = toggle_visibility(104)&gt;<br>&lt;img src="../../image/icon_toggle.jpg" width="22" height="22" <br>border="0"&gt;&lt;/a&gt;<br>&lt;span class = "hidden_hint" id=104&gt;<br>Add -&lt;img src="../images/sq_root_7.gif" align="absmiddle"&gt; to both sides<br>of the equation.<br>&lt;/span&gt;<br><br>This works fine when I use a number for the id.<br>However I would prefer(reasons involve the rest of the page) to use "hint4" <br>for the ID<br>When I use hint4 with or without quotes, the whole toggle fails.<br>An ALERT inserted in the function returns object for id when I use hint4<br>and returns the number when I use a number.<br><br>I do not understand.<br>Can someone explain what goes wrong when I use id = hint4 ?<br><br>Thanks for any help.<br><br>Del</span>