Arg Apostrophe!!
Jul 23, 2005
In my form I have an email textfield. Whenever the user enters an email
address the form gets automatically submitted using JavaScript. However,
when a user enters in an email that contains an apostrophe eg:
Mc’Knight. I get a javascript error and the form never gets submitted.
View 1 Replies
May 3, 2006
which of the following two codes is correct and where is the correct notation standardized:
a) alert("Hello World");
b) alert('Hello World');
View 4 Replies
View Related
Feb 2, 2010
Whoever allowed apostrophes to be valid within emails needs some talking to!
Anyway. I have just found out that this JS function I have been using and have no idea how it works does not allow emails with apostrophes in it. Does anyone know how to alter this code to allow apostrophes?
var pattern = new RegExp(/^(("[w-s]+")|([w-]+(?:.[w-]+)*)|("[w-s]+")([w-]+(?:.[w-]+)*))(@((?:[w-]+.)*w[w-]{0,66}).([a-z]{2,6}(?:.[a-z]{2})?)$)|(@[?((25[0-5].|2[0-4][0-9].|1[0-9]{2}.|[0-9]{1,2}.))((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[0-9]{1,2}).){2}(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[0-9]{1,2})]?$)/i);
View 8 Replies
View Related
Jun 6, 2011
I have to pass a certain number of parameters, extracted from DB, to a javascript function.Among them there are for example numbers but also descriptions as names and surnames
Code:
<A href="javascript:doAction("+value+")"></A>"
Where value is a set of parameters formatted for example in the following way:
[code]....
View 7 Replies
View Related
Oct 13, 2010
I've recently added Cufon to a site and generated a font that includes the WordPress Punctuation option. [URL]
However when I try and use an apostrophe in the text it does not appear on the page.
As a potential fix, I tried inserting ' into the HTML tab of the page via the WP dashboard. It works in Firefox. Cufon displays an apostrophe.
However, in Internet Explorer it displays the code and not the apostrophe.
View 2 Replies
View Related
Nov 8, 2007
we had someone write this script for us a few years ago and we thought it was working fine until this week. It uses javascript to generate a dependant drop down menu eg. Depending on what the user chooses in the first drop down menu, (in this case a manual/book title) the second drop down displays the chapter/category headings that are available within that manual and then the users uploads a file that appears under that heading.
If our user adds a chapter/category heading with an apostrophe in it the script quits and the second drop down does not display the corresponding chapter headings. We are storing the info in a mysql database and use php and javascript to extract the data/build the drop down menus. Code:
View 3 Replies
View Related
Dec 6, 2011
I have a situation where i need to locate a radio button by it's value and check it. The solution below works in all browsers. However, in IE 6 & 7 (not 8), if there's an apostrophe it blows up.It's happening for me in both jQuery 1.6.4 and 1.7.1. Here's an example. var diagnosis = "Huntington's Disease"; $(...).find('input[value="' +diagnosis+ '"]').attr('checked','checked'); I've tried diagnosis.replace("'","'") and that seems to have no affect.
View 4 Replies
View Related
May 4, 2010
I am trying to re-work some pre-written Javascript code at which I am a novice at (I'm more CSS, HTML, PHP...). I am trying to validate a form field for a Purchaser's last name while accounting for an apostrophe if they have one in their last name.
I bet it's something simple, but I still haven't been able to figure it out, or write it correctly:
function checkPurchaserName()
{
var err = false;
var f = $(getApogeeElement('purchaser_name_first'));
var l = $(getApogeeElement('purchaser_name_last'));
[Code]...
As an example. I started the purchasing process with the name "Patrick O'Malley".
At the end page where this validation occurs, they have (2) text boxes, one for "first name" and one for "last name". They must type the same exact name for purchaser that they did for applicant, so "Patrick", then "O'Malley"
View 10 Replies
View Related
Jun 16, 2002
In the folowing Input tag I am trying to get the apostrophe in "Friends" to appear and it almost works the way it is but when I first load the page the "" (backslash) also shows up. If I click in the field (onfocus) the words "Friend's Email" disappear as they are supposed to. Then when I click somewhere else (onblur) it comes back like this "Friend's Email" which is the way I want it to appear when the page first loads. Is this a browser problem or something else I am missing?
<input type="text" name="who_to" size="12" value="Friend's Email" maxlength="100" onFocus="if(this.value='Friend's Email') {this.value=''}" onBlur="if (this.value=='') {this.value='Friend's Email'}">
View 2 Replies
View Related