473,395 Members | 1,937 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,395 software developers and data experts.

Javascript with Ajax refuses to work under firefox and IE9 but doing fine with chrome

2
Iam trying to figure out after solving quite a few css problems why a javascript doesnt respond under IE9 and Firefox. The script is quite simplistic still .. no luck !! It is simple an email validation that uses rsv.js by Benjamin Keen and ajax to push data to a php "sign-up" function on a different file. Chrome does this gloriously.. IE no matter what version and firefox, DO NOT.
Any ideas pls pls??

Here is the script that occupies an area between the head:
Expand|Select|Wrap|Line Numbers
  1. function sign_up(email) 
  2.         {
  3.         var rules = [];
  4.         rules.push('required,NewsletterEmail,Your Email is necessary for the newsletter!');
  5.         rules.push('valid_email,NewsletterEmail,The Email is Invalid');
  6.         if (rsv.validate(document.getElementById('newsletter'), rules)) {
  7.             $.ajax({
  8.                 type: 'POST',
  9.                 url: 'scripts/sign-up.php',
  10.                 data: 'email='+document.getElementById('NewsletterEmail').value,
  11.                 success: function(data){ $('#result').html(data); }
  12.             });
  13.         }
  14.     } 
  15.  
The form that is validated:
Expand|Select|Wrap|Line Numbers
  1. <form id="newsletter" name="newsletter">
  2. <input class="email" id="NewsletterEmail" name="NewsletterEmail" value="Email" 
  3. type="text" /><a class="btn" onclick="sign_up(NewsletterEmail.value);">SubmitNow</a>
  4. </form>
  5.  
IE9 and Firefox describe error as "NewsletterEmail is not defined" ,,Any ideas????
Mar 1 '12 #1
1 1579
EduCon
2
Never Mind, found it !!
Mar 1 '12 #2

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

Similar topics

1
by: ajaxsearcher | last post by:
I just search on google and find out a gallery using Ajax Technology at http://gettingzone.com It runs so fast when login, logout, submit, upload image, process ... amazingly. It's cool. How can...
2
by: Altman | last post by:
I have created an ascx control and I am calling registerclientscriptblock. The path to the js file is relative to the aspx page and not the ascx file. The function runs fine in IE7 but in...
1
by: JohnnieTech | last post by:
I am using some javascript/ajax to load content into a main div. The problem I am running into is that it will work in IE but not in FF. In FF I don't get any sort of load at all. I have a 1...
1
by: satishr23 | last post by:
Hi, I am having some problems with handling cross domain requests in javascript/ajax and would really appreciate any help. My client has a javascript file which he includes in his HTML...
2
by: Sky Kast | last post by:
I'm running Firefox on a win 98 computer and javascript won't work And yes i have set everything javascript that should enable to true or check so it's not that
3
by: safiratec | last post by:
Hi, I want to show a div depending of the value of a <select> option, using 2 functions hidediv() and showdiv() - it is working fine in firefox, but not in IE (tested with IE 6 and 7). <body...
1
by: mehstg1319 | last post by:
Hi everybody Was wondering if anybody could help. I am a student, developing a couple of pages for my university. I am getting a problem with a javascript Hide/Show that I have put on the...
3
by: dmorand | last post by:
I have a page where I'm using ajax to retrieve some employee info when a user clicks a "Retrieve Employee Info" button. The issue I'm having is that when the user updates the employee info,...
2
KeredDrahcir
by: KeredDrahcir | last post by:
When using an object tag to embed a video file everything looks fine in Internet Explorer and Safari. However I can't get it to display at all in Opera. More importantly in Firefox and Google Chrome...
1
by: rohit189 | last post by:
I am Working on a asp.net web site. i am using visual studio.net 2008. i use some ajax control. for my web site. i use update panel on my web pages. when i run my web site on local host ajax...
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...
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: 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
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.