473,386 Members | 1,721 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Problem with string and apostrophe

263 100+
Hi all.

I have problem with this code javascript:

Expand|Select|Wrap|Line Numbers
  1. <input type="submit" name="Submit" value="Go" onclick="if(confirm('Confirm?')) location.href='page.asp?DES=Try after 1' minute'; return false;"></a> 
  2.  
If delete the apostrophe in the string "Try after 1' minute" the page working:

Expand|Select|Wrap|Line Numbers
  1. <input type="submit" name="Submit" value="Go" onclick="if(confirm('Confirm?')) location.href='page.asp?DES=Try after 1 minute'; return false;"></a> 
  2.  
Why? Any solution?
Can you help me ?

Thanks
viki
Jul 11 '08 #1
4 2152
acoder
16,027 Expert Mod 8TB
Escape the single quote:
Expand|Select|Wrap|Line Numbers
  1. <input type="submit" name="Submit" value="Go" onclick="if(confirm('Confirm?')) location.href='page.asp?DES=Try after 1\' minute'; return false;"></a> 
  2.  
Jul 11 '08 #2
viki1967
263 100+
OK, thanks Acoder !!!!!
Jul 12 '08 #3
acoder
16,027 Expert Mod 8TB
You're welcome. Glad to help.
Jul 12 '08 #4
acoder
16,027 Expert Mod 8TB
Hmm, just noticed the closing anchor tag - not sure what that's doing there. Make sure your HTML is valid.
Jul 12 '08 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

10
by: DataBard007 | last post by:
Hello Access Gurus: I use Win98SE and Access97. I just built a simple Access97 application which holds all contact information for my personal contacts, such as first name, last name, address,...
12
by: Jeff S | last post by:
In a VB.NET code behind module, I build a string for a link that points to a JavaScript function. The two lines of code below show what is relevant. PopupLink = "javascript:PopUpWindow(" &...
1
by: karen987 | last post by:
I have an ASP news page to which you can add comments. The comments open up in a new window, and users can click reply to reply to them after which they are taken to the parent page which has a...
6
by: pabloski | last post by:
Hi to all, I have a little problem with unicode handling under Python. I have this code s = u'A unicode string with this damn apostrophe \x2019' outf = codecs.open('filename.txt', 'w',...
5
by: =?Utf-8?B?TEtOZXdzR3JvdXBz?= | last post by:
Hi I have a list which pulls out items from a stored procedure. Unfortunately some of the items it pulls out have apostrophes. This info need to be placed in a URL but it keeps truncating at the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.