Validation and Firefox(js scripts doesn''t fire)

P

Pat

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?
 
W

Waldorf

My understanding is that .net doesn't support client side validation in
anything other than ie. Yay.

It does however validate on the server for these users... hope that
helps?
 
W

WJ

..Net is an advanced system that is run on MS/Windows platform only ! Period
! Certain features will not work with non-ms browsers as you found out. As a
result, you may want to tell your users that to use your website, MSIE is
required. However, if you wish to allow all platforms to participate in your
website, then you have two choices: a) Do not use .Net period and or b) Use
..Net but do not use advanced features offered in .Net.

John
 
P

Patrick.O.Ige

Thx Mr John

WJ said:
.Net is an advanced system that is run on MS/Windows platform only ! Period
! Certain features will not work with non-ms browsers as you found out. As a
result, you may want to tell your users that to use your website, MSIE is
required. However, if you wish to allow all platforms to participate in your
website, then you have two choices: a) Do not use .Net period and or b) Use
.Net but do not use advanced features offered in .Net.

John
 
K

KMA

Bit of a sweeping statement. ASP.NET just outputs data for the browser to
render. Theoretically, the output is browser agnostic. Of course,
practically, the designers of ASP.NET share the canteen with the designers
of MSIE, so it's natural that they get together over a couple of milk shakes
and say things like "wouldn't the internet be great if we had client side
validation rather than shunting everything back and forth to the server". An
lo and behold, the IE team implement support for ASP.NET latest trick.

But I strongly disagree that ASP.NET should only be used with IE. Fact is
that market share is moving away from IE, although IE is still dominant. You
really have to cater for as much of the market that you practically can. At
the moment we're talking about desktop browsers. ASP.NET is very capable of
supplying content for mobile devices too.

Of course, to cater for most browsers you have to write your app based on
the minimum shared spec. It's true that this precludes many "advanced"
features, but often these were just eye candy anyway. Your user doesn't
really *need* Java menus.

BTW the reason the page doesn't validate with Firefox could be because you
have java/script turned off.
 
W

WJ

KMA said:
But I strongly disagree that ASP.NET should only be used with IE. Fact is
that market share is moving away from IE, although IE is still dominant.
You really have to cater for as much of the market that you practically
can. At
the moment we're talking about desktop browsers

Then we, developer should take care not to base our logic on one central
platform such as .Net. We should demand .Net creator (MS) to accomodate
other tools as well. Not just MSIE. So far, MS does not comply. Why do .Net
Validator controls work very well on MSIE but not on other browsers ?
Because "control of market by MS", period! I am not anti-MS, it is useless
to yell at a billionaire. I am just saying that, us, the developers, make
sure that stuffs donot work on non-MSIE should not be implemented because
they break anyway. Why use them.
ASP.NET is very capable of
supplying content for mobile devices too.

I am not up to speed on mobile devices. However, do these tiny devices host
non MS tools too ? Such as FF and NS ? I know mobile device only works with
Windows platforms (I could be wrong) ?
Of course, to cater for most browsers you have to write your app based on
the minimum shared spec. It's true that this precludes many "advanced"
features, but often these were just eye candy anyway. Your user doesn't
really *need* Java menus.

Well. My intention is mainly for KISS. If the tool itself (.net) already
provides such features as client validator controls, then why should I have
to write my own codes to do the same thing on the server ? It is a
duplication of effort that should be avoided. I do like the client validator
controls offered by Asp.Net, and I told my clients that you must use IE. In
fact, 99.9% of my clients are MS/Windows (98SE, and XP Home or Pro). These
OSes ship with MSIE. If other browsers don't work, then use IE.
BTW the reason the page doesn't validate with Firefox could be because you
have java/script turned off.

I tried this with NS too and it broke! On my website, I offered other JS
features such as onFocus, onBlur and doubleclick, etc, etc... and most of
those work fine on non MS browsers. So I know that my clients do enable JS.
Otherwise, Asp.Net form would not work in the 1st place. I hope VS2k5 will
be improved and that Validator controls would work with other browsers
(would be nice)

John
 
K

Kevin Spencer

So are you saying it won't work

Are you insane? If you read the article
(http://asptoday.com/Content.aspx?id=2339), it explains how ASP.Net uses a
config section called <browserCaps> to enable the server-side components to
interact with a variety of browsers. In addition, it describes the problem
with the version of browserCaps that is installed with the .Net Framework
1.1. Finally, it details how to rememdy the issue, and has a link to a
complete and excellent browserCaps config section that can be added to the
machine.config file, and instructions on how to do it!

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Neither a follower nor a lender be.
 
K

Kevin Spencer

Excellent article and reference!

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Neither a follower nor a lender be.
 
K

Kevin Spencer

Yuor understanding is wrong. See http://asptoday.com/Content.aspx?id=2339.
It explains how ASP.Net uses a config section called <browserCaps> to enable
the server-side components to interact with a variety of browsers. In
addition, it describes the problem with the version of browserCaps that is
installed with the .Net Framework 1.1. Finally, it details how to rememdy
the issue, and has a link to a complete and excellent browserCaps config
section that can be added to the machine.config file, and instructions on
how to do it!

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Neither a follower nor a lender be.
 
K

Kevin Spencer

.Net is an advanced system that is run on MS/Windows platform only !

Incorrect! Period! See http://asptoday.com/Content.aspx?id=2339. It explains
how ASP.Net uses a config section called <browserCaps> to enable the
server-side components to interact with a variety of browsers. In addition,
it describes the problem with the version of browserCaps that is installed
with the .Net Framework 1.1. Finally, it details how to rememdy the issue,
and has a link to a complete and excellent browserCaps config section that
can be added to the machine.config file, and instructions on how to do it!

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Neither a follower nor a lender be.
 
K

Kevin Spencer

I wouldn't thank him yet. See my replies to this thread.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Neither a follower nor a lender be.
 
K

Kevin Spencer

You make some good points. However, see my replies to this thread. Most
ASP.Net Controls are browser-aware, and use the <browserCaps> Configuration
Section in the machine.config, or web.config file. This file can easily be
modified, as per this article: http://asptoday.com/Content.aspx?id=2339.

The best news is, in the .Net platform 2.0, the <broserCaps> Configuration
section has been removed, and replaced with a folder in the CONFIG folder
containing multiple *.browser files, which contain detailed BrowserCaps for
many browsers, a much more complete collection than in the .Net Platform
1.1. And of course, you can modify and add to them as well, and they all
conform to the MSXML XML Standard. Thes include the most popular browsers,
such as Netscape, AOL, FireFox, Safari, and other Mozilla versions, as well
as a number of minor players and a huge selection of portable device
browsers.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Neither a follower nor a lender be.
 
K

KMA

WJ said:
Then we, developer should take care not to base our logic on one central
platform such as .Net. We should demand .Net creator (MS) to accomodate
other tools as well. Not just MSIE. So far, MS does not comply. Why do ..Net
Validator controls work very well on MSIE but not on other browsers ?
Because "control of market by MS", period! I am not anti-MS, it is useless
to yell at a billionaire. I am just saying that, us, the developers, make
sure that stuffs donot work on non-MSIE should not be implemented because
they break anyway. Why use them.


I am not up to speed on mobile devices. However, do these tiny devices host
non MS tools too ? Such as FF and NS ? I know mobile device only works with
Windows platforms (I could be wrong) ?

Yep. Many mobile devices run proprietary browsing software, not MSIE,
Firefox or any other desktop software. They just render HTML.
Well. My intention is mainly for KISS. If the tool itself (.net) already
provides such features as client validator controls, then why should I have
to write my own codes to do the same thing on the server ? It is a
duplication of effort that should be avoided.

And how do you know that the information really was validated client side?
The way I see it, client side validation is just a whistle and bell to help
the user fill out the form quicker. The actual decision about whether the
post is good should be made sever side.
I do like the client validator
controls offered by Asp.Net, and I told my clients that you must use IE. In
fact, 99.9% of my clients are MS/Windows (98SE, and XP Home or Pro). These
OSes ship with MSIE. If other browsers don't work, then use IE.

Well, you can make this stipulation when you know your clients, or better
still are in a position to control their choices, ie corporate intranet. But
if you run a shopping site, you can't be so regimented. Imagine walking into
a regular store and being turned away because you're wearing jeans.
I tried this with NS too and it broke! On my website, I offered other JS
features such as onFocus, onBlur and doubleclick, etc, etc... and most of
those work fine on non MS browsers. So I know that my clients do enable JS.
Otherwise, Asp.Net form would not work in the 1st place. I hope VS2k5 will
be improved and that Validator controls would work with other browsers
(would be nice)

I can't see how a new version of VS will help. It's the client side that
blocks validation (or rather the client side processing that runs it). The
reason it's blocked is out of real or imagined security concerns. These
concerns aren't going to disappear so I figure that feature poor but
security rich browsing will become more popular. None of this is
incompatible with ASP.NET philosophy though.
 
E

eruth

The javascript it produces is Microsoft specific, and will not work in
anything other that IE - trust me I have been through this pain
barrier! Client side validation will not run in Firefox, but server
side will.

My solution has been to run all validation on the server, therefore
making sure that it all runs.
 
K

KMA

So ASP.NET isn't just for IE6.0 then? :)


Kevin Spencer said:
Incorrect! Period! See http://asptoday.com/Content.aspx?id=2339. It explains
how ASP.Net uses a config section called <browserCaps> to enable the
server-side components to interact with a variety of browsers. In addition,
it describes the problem with the version of browserCaps that is installed
with the .Net Framework 1.1. Finally, it details how to rememdy the issue,
and has a link to a complete and excellent browserCaps config section that
can be added to the machine.config file, and instructions on how to do it!

--
HTH,

Kevin Spencer
Microsoft MVP
.Net Developer
Neither a follower nor a lender be.
 
P

Peter Blum

There is some incorrect information being given here.

Here are the facts:
1. ASP.NET 1.x outputs DHTML based scripts. Specifically, it uses
document.all[] to locate an element on the page. FireFox/Mozilla and most
other browsers use the W3C DOM standard, which does not have the
document.all[] statement.
Whether or not you setup browsercaps or event <@ Page
clientTarget="upLevel">, you still will not change how the web controls
identify their validators in the client-side Page_Validators array or within
the WebUIValidation.js file.
For more details, see:
http://aspnet.4guysfromrolla.com/articles/051204-1.aspx

2. Several vendors, including myself, have created replacements for the
validators that does handle most browsers in ASP.NET 1.x. My solution is
Professional Validation And More (http://www.peterblum.com/vam/home.aspx).
The article references another free solution, Paul Glavich's DOM Validators.
My software is more of a general upgrade to validation, not just a fix to
this particular problem.

3. ASP.NET 2.0 has been fixed to address their limitation. They are now
using document.getElementById() which is W3C DOM compliant.

--- Peter Blum
www.PeterBlum.com
Email: (e-mail address removed)
Creator of "Professional Validation And More" at
http://www.peterblum.com/vam/home.aspx
 
M

Martin Honnen

Kevin said:
Most
ASP.Net Controls are browser-aware, and use the <browserCaps> Configuration
Section in the machine.config, or web.config file. This file can easily be
modified, as per this article: http://asptoday.com/Content.aspx?id=2339.

But note that it says at the end:
"For instance, it might still not help you with client-side
validators, as even if Firefox is recognized as an uplevel browser, in
many cases these validators are still not W3C complaint and may not work
properly anyway outside IE."

That is also my experience, the problem with the client-side validation
code that ASP.NET 1.x generates is that is is scripted against the IE
DOM and if you have ASP.NET serve those scripts to Mozilla, Netscape or
Firefox the user might end up with client-side script errors and not
client-side validation.
 
B

Bruce Barker

the clientside validation only works with IE, as it uses the IE dom, not the
W3C dom, so asp.net suppresses the output if the browser is not IE. the
serverside validation works with any browser.

asp.net 2.0 is supposed to remove this restriction.

-- bruce (sqlwork.com)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top