Posted By: phunky_avocado | Sep 23rd, 2004 @ 1:57 PM
page 1 of 1
Comments: 4 | Views: 5595
phunky_avocado
phunky_avocado
Dude! It's the (grilled) cheese.
...I am developing an ASP.NET app.  I have extended the standard .NET validators and have a custom js file for my client-side validation.  My validation scripts call the standard .NET validation scripts in WebUIValidation.js for the basic validation test; all that my scripts add is some custom "invalid data" notification UI.

The thing is, your validation scripts rely on MS DOM support in the client browser.  So, for Safari, NN, Moz the standard .NET scripts fail (like, you cannot call "document.all[...]", "final" (assigned to in ValidationSummaryOnSubmit()) is a reserved word,... and who knows what else?).

So, maybe you could provide a non-MS DOM version of your WebUIValidation.js file and have your validation base class output javascript that is compliant with non-MS DOM-enabled browsers (currently, it outputs javascript that builds up an array of the validators on the page by using "document.all[...]").

So how 'bout it?  Can we play fair with other browsers?  As it stands, I have to go through the entire of WebUIValidation.js and "fix" it.
Minh
Minh
WOOH! WOOH!
I don't know if there's a ROI for doing that (maybe other than a goodwill gesture). But hey, this could be an opportunity for a 3rd-party vendor to jump in and make a profit, eh?
PeterF
PeterF
Early Adopter
Minh:
Well, it means an ROI for the developer, right?

phunky_avocado:
Perform the browser check for the browsers you plan to support, and output different javascripts accordingly.
sbc
sbc
GW R/Me
Vote for this suggestion: Client Side Validation if you wish to have client-side validation work on other browsers. If it get's enough votes then maybe .NET 2.0 will be able to validate for various browsers.

Would be good if the current version got this though (unlikely unfortunately).

Vote for this bug as well: asp:Menu control only works in IE

Hopefully all JavaScript that is output in the next version of .NET will work with multiple browsers - and will save developers a lot of time (for those that do care about accessibility, or whose sites need to be accessible due to the law - which AFAIK is all web sites).
page 1 of 1
Comments: 4 | Views: 5595
Microsoft Communities