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

Problem with double quotes

Status
Not open for further replies.

kamloops

Programmer
May 7, 2003
34
0
0
CA
Hi There,

I have this bit of code
document.write(&quot;<input type=hidden name=Test value=&quot; + document.title + &quot;>&quot;);

How do I get it so the document.title is printed within double quotes...

The problem is that it doesn't grab the whole title just the first word because it needs to be in double quotes.


Thanks for any help
 
document.write(&quot;<input type=hidden name=Test value=\&quot;&quot; + document.title + \&quot;&quot;>&quot;);

~mgb
 
Hi There,

Thanks... I tried it but it doesn't work I get an error invalid character..

 
Oops - Error. If should be-

document.write(&quot;<input type=hidden name=Test value=\&quot;&quot; + document.title + &quot;\&quot;>&quot;);

~mgb

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top