Solved

Multiple nested quotes

Posted on 2004-03-23
3
938 Views
Last Modified: 2009-12-16
How do I do multiple nested quotes (3)?  The situation is a function that sets the innerHTML of a <TD> to contain a link that references another function, with parameters. I tried alternating  quotes like you do when you only have one set of quotes nested inside another, but that didn't work for the additional set of quotes.
                                          
html = 'Demonstration Project (Demo1)<td><a href = "javascript:ShowBugs (102507,'Demonstration+Project+(Demo1)',0,2)">Current Bugs</a>';

Thanks.
0
Comment
Question by:drr37
  • 2
3 Comments
 
LVL 10

Accepted Solution

by:
Bustarooms earned 250 total points
ID: 10660617
in your example you need to escape the single quotes with a slash

html = 'Demonstration Project (Demo1)<td><a href = "javascript:ShowBugs (102507,\'Demonstration+Project+(Demo1)\',0,2)">Current Bugs</a>';
0
 

Author Comment

by:drr37
ID: 10660812
ok, thanks, it worked
0
 
LVL 10

Expert Comment

by:Bustarooms
ID: 10660823
np
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Html5 Index on a table 7 26
How to convert from xls to xlsx using java 7 40
jquery datepciker end date add 6 days 6 39
Html CheckBox obtain Its Value 5 14
Article by: DanRollins
This article describes a JavaScript program that creates a maze made of hexagonal cells.  In Part 2 (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/A_7850-Hex-Maze-Part-2.html), we'll extend the program by adding a depth-…
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question