Solved

Multiple nested quotes

Posted on 2004-03-23
3
939 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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Avoid defining the variables in the global scope; trying to define them in a local function scope. Because:   • Look-up is performed every time a variable is accessed.   • Variables are resolved backwards from most specific to least specific scope…
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-…
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…

792 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