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

document.write problem

Status
Not open for further replies.

chebbi

Programmer
Feb 6, 2002
98
IN
Hi

Iam trying to build a row dynamically using
document.write( '<tr><td onclick=groupby(&quot;Birth Date&quot;,6)></td></tr>' );

the problem is that on IE6 it breaks because of the &quot;Birth date&quot; parameter. For one word parameter its good. Any ideas?

Badrinath Chebbi
 
chebbi, try switching the quotes, see if this works instead:

document.write(&quot;<tr><td onclick=groupby('Birth Date',6)></td></tr>&quot;);


Forget the Nobel Peace prize, I just want to take over the world!! [hammer]
 
Here's another idea: declare a variable, assign the parameter 'Birth Date' to that var and call the var inside the document.write??

Forget the Nobel Peace prize, I just want to take over the world!! [hammer]
 
Or try this:

document.write( &quot;<tr><td onclick=groupby(\&quot;Birth Date\&quot;,6)></td></tr>&quot; );

Certain characters in javascript need to be proceeded with a \ and are known as escape characters.

Good Luck



Pat B
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top