PDA

View Full Version : Cool DHTML Tooltip - Quotation Mark Problem



pdxuser
03-09-2007, 03:36 AM
1) Script Title: Cool DHTML Tooltip

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

3) Describe problem:

The instructions say any apostrophes (') need to be escaped (\'), but what about quotation marks (")? They seem to be closing the onMouseover attribute (onMouseover="ddrivetip('The use of "ironic quotes" is often unnecessary')"), yet escaping out the quotes doesn't seem to fix the problem (onMouseover="ddrivetip('The use of \"ironic quotes\" is often unnecessary')"). Unfortunately, the quotes I'm using are definitely necessary. Is there a method of escaping the quote marks, or even escaping all of the ddrivetip values by putting them in a javascript file or something?

thetestingsite
03-09-2007, 03:43 AM
Instead of escaping the double quotes, try changing those double quotes to ". Try the following for example:



onMouseover="ddrivetip('The use of "ironic quotes" is often unnecessary')")


Hope this helps.

Added Later: Instead of using " use & #34; (without the space) to make it valid HTML.