PDA

View Full Version : Textual Tooltip II fade in



MT Chair
03-23-2008, 02:45 AM
1) Script Title: Small problem with body of text..

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex5/linkinfo2.htm

3) Describe problem: I've narrowed it to the below code and in particular with your/my text which is to be published... area in bold:


<p><A HREF="http://www.wsabstract.com" onMouseOver="fade_up('fade1','<FONT SIZE=4 FACE=Verdana>MY TEXT IN HERE!</FONT>','000000')" onMouseOut="fade_down('fade1')">Website Abstraction</A>

What I have noticed is that I get a Run Time error message with expected ")" with certain punctuation!! So far if I've found the culprit to be apostrophes - ' - for example County's which is creating the run time error. Has anyone found the same problem; does anyone know how to correct this or is it just a ghost in the machine and a MSFP problem? So far i'm huh, or meh!

Thanks in advance.

Jas
03-23-2008, 03:25 AM
You need to slash out the apostrophes like this:


Country\'s

The problem is that Javascript uses ' as the start and end of a string. Putting it in the middle makes it think that the string ended when it didn't, thus causing the error.



var variable1 = 'This is a cool string';
var variable2 = 'This isn't a cool string';