473,396 Members | 2,004 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.

validation is not working on fire fox

i have used required field validaiton in validator.js,it working well on ie7 but not in
firefox.when i click on submit in firefox it not validate the field.pls help me
code used in validator.js is:
Expand|Select|Wrap|Line Numbers
  1.  RequiredFieldValidator.prototype = new Validator();
  2. function RequiredFieldValidator(elementId,defaultMessage,args){
  3.     this.elementId = elementId;
  4.     this.args = new Array();
  5.     this.defaultMessage = defaultMessage;
  6.     this.messageKey = "required_field_message";
  7.     this.validateMe = function(elementObj){
  8.         var myValue = getValueOfElement(elementObj);
  9.         var retValue = true;
  10.         if(myValue == null){
  11.             return false;
  12.         }if(myValue.constructor == Boolean){
  13.             if(myValue === false)
  14.                 retValue =  false;
  15.         }else if(myValue.constructor === Array){
  16.             if(myValue == null || myValue.length < 1)
  17.                 retValue =  false;
  18.         }else{
  19.             myValue = trim(myValue);
  20.             if(myValue == null || myValue == "")
  21.                 retValue =  false;
  22.         }
  23.         return retValue;
  24.     }
  25.     this.setArgs(RequiredFieldValidator.arguments);
  26. }
Jun 26 '08 #1
3 1104
hsriat
1,654 Expert 1GB
Is this JavaScript?
Jun 26 '08 #2
acoder
16,027 Expert Mod 8TB
Yes it is.

ax11, please use code tags when posting code. It makes it easier to read. Thanks!
Can you show how this validator is used? The calls made and how is getValueOfElement defined?
Jun 26 '08 #3
hsriat
1,654 Expert 1GB
Yes it is.
Ok, the 'getValueOfElement' confused me.
Jun 26 '08 #4

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

Similar topics

3
by: Rob Meade | last post by:
Hi all, I have a login page which has username and password fields, a login button, and 2 validation controls (one for each field) - currently I have controls to display to the summary if the...
3
by: Jason Shohet | last post by:
They are working fine on our w2k servers. On the remote site -- using 2003 server -- the controls don't occur until after the action is taken. We are doing a catch, so that we don't give the user...
2
by: Marius Traelnes | last post by:
Hello! My problem is that i have validation controls on my webform but they are not "fired" because there is no "onclick" event being made on the button that should "fire" off the validation...
8
by: John Dalberg | last post by:
I have an aspx page that was developed initially in Dreamweaver as a regular html file. I have added a few textboxes and required validators. The problem is that the client side validation is not...
45
by: Pat | last post by:
its seems asp.net validation doesn't fire when using FireFox? Tested a page and it doesn't fire. It seems the javascript doesn't fire Any ideas?
9
by: Bill Long | last post by:
I have a control that simply displays a list of links. Following one of the links doesn't post back or redirect to another page, it simply hides the current panel and shows the one you selected......
22
by: Charles Law | last post by:
Could someone please explain to me, in words of one syllable or less, how I get the Validating event to fire for a form. I have a form with one text box, and two buttons: OK and Cancel. I have...
2
by: dustbort | last post by:
I recently had a problem where my required field validator stopped working. But, the page still posted back and tried to insert a record into the database without performing server-side validation....
6
by: Jon Paal | last post by:
validation doesn't fire what's missing ????? /////// ---- code -----/////////////////////////// Sub btnSubmit_Click(sender As Object, e As System.Web.UI.ImageClickEventArgs) 'Handles...
0
by: =?Utf-8?B?QmFyYmFyYSBBbGRlcnRvbg==?= | last post by:
I'm having trouble working with a Summary Validation control. I need to click my submit button twice for the Summary to display when validation errors occur on the page. Background: My page...
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
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?
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
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...
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.