?
Solved

Quote Mark In OnClientClick Message

Posted on 2010-09-10
1
Medium Priority
?
866 Views
Last Modified: 2012-05-10
I want to have quotes in some text displayed to the user when they click a botton but I can't get it to work.  This is my lastest attempt,

cmdDelete.OnClientClick = "return confirm('Are you sure you want to delete \'" + name + "\'?');"

I've tried quotes, double quotes, double single quotes, and other things but I keep getting javascript error when I run the page.  Also, something converts " to &quot when I try using quotes.

Does someone know how to do this?


Thanks,
0
Comment
Question by:ScottMacMaster
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 

Accepted Solution

by:
ScottMacMaster earned 0 total points
ID: 33650146
Oh, nevermind.  I didn't realize the text in name had a newline character in it.
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

In .NET 2.0, Microsoft introduced the Web Site.  This was the default way to create a web Project in Visual Studio 2005.  In Visual Studio 2008, the Web Application has been restored as the default web Project in Visual Studio/.NET 3.x The Web Si…
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Suggested Courses

800 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