473,396 Members | 2,111 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,396 software developers and data experts.

Syntax error, missing right parenthesis.. help

<input type="submit" name="delete_student" value="Delete Applicant"
onClick="setSubmitVal(this); return
willDeleteApplicant('O'Connor, Kerry B');">

This HTML tag causes Javascript errors in IE 7+ and in Mozilla; seems
to be OK in Firefox 1.0 for Linux.

This is a time-sensitive issue that I can't seem to resolve, could
someone come up with a quickie for me in this case? It seems the
student's name is breaking things in Javascript because their name is
"O'Connor".

Thanx
Phil

Jun 14 '06 #1
1 2184
Phil Powell said the following on 6/14/2006 4:55 PM:
<input type="submit" name="delete_student" value="Delete Applicant"
onClick="setSubmitVal(this); return
willDeleteApplicant('O'Connor, Kerry B');">
This HTML tag causes Javascript errors in IE 7+ and in Mozilla; seems
to be OK in Firefox 1.0 for Linux.

This is a time-sensitive issue that I can't seem to resolve, could
someone come up with a quickie for me in this case? It seems the
student's name is breaking things in Javascript because their name is
"O'Connor".


Escape it then:

"O\'Connor"

But, there is nothing in that code that should cause a syntax error. The
error is in code elsewhere.

And, don't use the onclick of the submit button to do that, use the
onsubmit event handler of the form.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Jun 14 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

699
by: mike420 | last post by:
I think everyone who used Python will agree that its syntax is the best thing going for it. It is very readable and easy for everyone to learn. But, Python does not a have very good macro...
6
by: dthmtlgod | last post by:
I am getting a syntax error on my SQL statement, not sure if I am doing this right. i am trying to pass a value from another form. strsql = "select PrinterModel, PrinterName, IP_Address,...
19
by: Nicolas Fleury | last post by:
Hi everyone, I would to know what do you think of this PEP. Any comment welcomed (even about English mistakes). PEP: XXX Title: Specialization Syntax Version: $Revision: 1.10 $...
4
by: Chris Kettenbach | last post by:
Hi Peter, I get error when processing the stylesheet. It errors here. <xsl:for-each select="registration)=1]"> specifically: Expression does not return a DOM node. registration)=1]<--
6
by: Peter Frost | last post by:
Please help I don't know if this is possible but what I would really like to do is to use On Error Goto to capture the code that is being executed when an error occurs. Any help would be much...
4
by: daniel | last post by:
I'm not quite new to this language, but such error has never happened so frequently before. I have no idea what to do about it, because there's actually no syntax error at all !! I'm using...
3
by: Thakur vikas | last post by:
when we run the query then we got ": (Error): ORA-00907: missing right parenthesis" what may be the error?
1
by: ozarka | last post by:
This select statement works and gives me True/False in RC33 column however the second statement gives me following error. Any idea? odbc--call failed. ora-00907: missing right parenthesis -...
3
by: willo | last post by:
Greetings all, I have run into a small problem with my understanding of some C++ language syntax, and seek some clarification. Below is a condensed version of some code I'm having difficulty...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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.