Solved

Quote Mark In OnClientClick Message

Posted on 2010-09-10
1
837 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
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

ScreenConnect 6.0 Free Trial

Discover new time-saving features in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI, app configurations and chat acknowledgement to improve customer engagement!

Question has a verified solution.

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

In this Article, I will provide a few tips in problem and solution manner. Opening an ASPX page in Visual studio 2003 is very slow. To make it fast, please do follow below steps:   Open the Solution/Project. Right click the ASPX file to b…
Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

777 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