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

Quote Marks(!) - Don't you just love them

Status
Not open for further replies.

tabbytab

Technical User
Mar 21, 2005
74
GB
Hi Guys

I've been here before but cannot get the syntax right.

On my ASP page I assign
Code:
txtA1Grade="""Do Not Know"""


Code:
Response.Write ("<input name=J type=radio title=" & txtA1Grade &"/>")

All works OK - When you hover over radio button you get displayed "DO Not Know"

If I assign txtA1Grade a value from a variable
Code:
txtA1Grade=strResponse
where variable strResponse is "Do Not Know"


When you hover over the radio button I get "DO" displayed rather than "DO Not Know"
I've played with CStr but to no avail.

Any pointers....

Many thanks in advance
TabbyTab :)
 
have you tried to use cstr(trResponse),

probably it is interpreting Do as one of the reserved keywords.


Cheers

QatQat

Life is what happens when you are making other plans.
 
Try this
Code:
Response.Write ("<input name=J type=radio title=""" & txtA1Grade &"""/>")
 
xwb

Your solution worked a treat.

Far to obvious for me


Many Thanks Guys

TabbyTab:)

 
it always gets me when a simple thing like the loss of standards even as far as simply using quotes comes in. I really wish IE wasn't so compatable with bad coding practices that way.

Point of my rant???

xwb is write. QatQat is also write.

BUT
this
Code:
Response.Write ("<input name=J type=radio title=""" & txtA1Grade &"""/>")

In standards eyes and maintainability wise is wrong also.
ALWAYS use quotes for your attribs in HTML. No matter how the HTML is outputted to the screen

e.g.
Code:
Response.Write ("<input name='J' type='radio' title='" & txtA1Grade &"'/>")


General FAQ faq333-2924
5 steps to asking a question faq333-3811
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top