PDA

View Full Version : javascript event alt tag change from " to ""



rich1234
09-05-2009, 09:31 AM
Hi, Would anyone know if there is a way to change the " in an event for ".
I am not sure but I dont know if search engines will read the alt text otherwise, or indead if they read anything in a javascript event. it starts


<a onmouseover="doTooltip(event,'<img src=&quot;


alt=&quot;Contemporary american <%=rs("Gallery")%>&quot;

Thanks for any clues
Richard

forum_amnesiac
09-06-2009, 08:45 AM
It is possible to use " in your JS events, you just have to be careful.

eg

alt=&quot;Contemporary american <%=rs("Gallery")%>&quot; - is processed correctly

alt="Contemporary american <%=rs("Gallery")%>" - is not processed correctly, the first " before Gallery closes the initial opening quote.

alt='Contemporary american <%=rs("Gallery")%>' - is processed correctly.

I am not 100% sure but I think that the search engine spiders take the &codes into account.

Hope this helps