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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Simple... I hope. Question on Quotation Marks 1

Status
Not open for further replies.

JediBMC

MIS
Dec 5, 2003
178
US
I am working to convert my intranet site from using frames and tables to using CSS. The problem I am running into is in dealing with writing the html that the client will see.

I have been using the response.write command to output html, such as:
Code:
response.write("<a href='index.asp'>Home</a>")
Now I need to be able to output html that already uses the single quotation mark, such as:
Code:
<a href="index.htm" onmouseover="style.backgroundColor='#264B88'>

I can't seem to figure out how to do this... PLEASE HELP!

Thanks,

-Brian-
I'm not an actor, but I play one on TV.
 
Try this:
Code:
<a href="index.htm" onmouseover="style.backgroundColor=[COLOR=red]"""[/color]#264B88[COLOR=red]"""[/color]>

------------------------------------------------------------------------------------------------------------------------
"I am not young enough to know everything."
Oscar Wilde (1854-1900)
 
does this work?

response.write("<a href='index.asp' onmouseover=""style.backgroundColor='#264B88'"">Home</a>")

-DNG
 
or this one:

Code:
response.write("<a href='index.asp' onmouseover='style.backgroundColor=""#264B88""'>Home</a>")
i too get confused with these some times...;)

-DNG
 
missed it again:

Code:
response.write("<a href='index.asp' onmouseover='style.backgroundColor="""#264B88"""'>Home</a>")

-DNG
 
Thanks DNG, your first answer worked:

Code:
response.write("<a href='index.asp' onmouseover=""style.backgroundColor='#264B88'"">Home</a>")

-Brian-
I'm not an actor, but I play one on TV.
 
great...i always mess it up too...

glad its working for you

-DNG
 
I've had problems with quotes too, I normally use chr(34),

Code:
response.write("<a href='index.asp' onmouseover=" & chr(34) &"style.backgroundColor='#264B88'" & chr(34) & ">Home</a>")

it can be a bit easier to read, but whatever works is good, just thought I'd add it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top