Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Quotes in HTML

Status
Not open for further replies.

LouisC4

Programmer
Jul 26, 2003
54
US
Is there such a thing as a triple quote?

Just kidding. I have a problem. Can someone please tell me how I can write the following?

Code:
onMouseover="ddrivetip('<tr><td class='style1'>Hello World</td></tr>')";

What kind of quotes can I use? The problem is the single quotes of class='style1' within the single quotes of ddrivetip(' ')

I would appreciate the help,

Louis
 
I have tried escaping the quotes but it does not work, the HTML doesn't like it. I wish there was triple quotes.

Thanks,

Louis
 
The way to escape quotes in HTML to do &quot;. The way to escape quotes in javascript is to add a slash in front of a quote that is the same as a quote that surrounds the string. So do either:
Code:
onMouseover="ddrivetip('<tr><td class=\'style1\'>Hello World</td></tr>')";

onMouseover="ddrivetip('<tr><td class=&quot;style1&quot;>Hello World</td></tr>')";
 
Vragabond, thanks for the information, but it still does not work, I don't know what else to try. I have also tried &amp;apos; and still does not work.

what else can I do??
 
What, precisely isn't working?

Could it be that the problem is something else? i.e. A problem with the javascript function you are calling?

To me it looks like you are calling some kind of tooltip script but then trying to create a table row and cell within it. I can't see how that would work since there is no surrounding table element.

<honk>*:O)</honk>

Earl & Thompson Marketing - Marketing Agency Services in Gloucestershire
 
This should really be in the Javascript forum, you know.

forum216

Lee
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top