Jquery Validations are not working in Firefox and Chrome, We did the project in ASP.NET VS2008

Posted by Pand under ASP.NET on 2/11/2013 | Points: 10 | Views : 1003 | Status : [Member] | Replies : 1
Jquery Validations are not working in Firefox and Chrome, working in IE correctly. We did the project in ASP.NET VS 2008.  

In Firefox and Chrome the Jquery validations are not at all firing, when we click on Submit the form is getting submitted with out Validating the Jquery validations. (But in IE it is working fine).

Can you please advice me, what needs to be done?


Posted by: aswinialuri-19361 on: 2/11/2013 [Member] Starter | Points: 25

You are missing the point of the 'support' method. You don't check if user is using Firefox or not. You check whether the browser 'supports' whatever DOM manipulation you are trying to do. This is called 'feature detection' which is preferred compared to 'browser detection'(what you are trying to do).

E.g. let's say you want verify whether the browser can render your CSS which contains 'opacity', so you use the jquery.support.opacity property.

So why would you want to do 'feature detection'? Simple, you can write cross browser scripts which are future compatible.

Let's say that you check for 'Firefox' and apply some elaborate DOM/CSS effects. What if the next version of Firefox breaks the particular DOM/CSS feature you were relying on? You will have to go back and update your script. But if you used 'feature detection', your code will be future proof against such changes.

Now, I am not suggesting that you will be able to use 'feature detection' for all your requirements, but put some thought about whether you want to use feature detection or browser detection.

Few more links worth reading:

http://peter.michaux.ca/articles/feature-detection-state-of-the-art-browser-scripting http://www.nczonline.net/blog/2006/11/16/browser-detection-versus-feature-detection/

Thanks & Regards
Aswini Aluri

Mark as Answer if it helps you
Aswini Aluri

Pand, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response