Netscape vs IE textbox control

M

Michael

Can anyone explain why code generated for IE 6 renders
textbox control with validator control correctly but the
code generated for Netscape 7.1 is "dumb"?
IE code:
<input name="tbMailFrom" type="text" id="tbMailFrom"
style="border-style:Inset;height:23px;width:200px;" />
<br />
<span id="RFVFrom" controltovalidate="tbMailFrom"
errormessage="From field is required.<br/>"
evaluationfunction="RequiredFieldValidatorEvaluateIsValid"
initialvalue="" style="color:Red;font-
size:10px;visibility:hidden;">From field is
required.<br/></span>

Netscape code:
<input name="tbMailFrom" type="text" size="40"
id="tbMailFrom" />
<br />
&nbsp;

Note the field validation has been replaced with &nbsp;
Any help with this would be appreciated.

Michael
 
A

Alessandro Zifiglio

Client side validation support is provided only for IE and degrades
gracefully to downlevel or Non IE browsers. That is for NS and all the other
browser brands out there, you will get server side validation. If you want
clientside validation that works in NS you might consider purchasing or
making your own suite of validation controls ;)

Considering the amount of work or the extra cash you might have to spill,
server side validation for downlevel and non IE browsers is excellent, you
do not loose any functionality. Instead of validating on the client it will
validate on the server during postback. Considering that IE dominates more
than 80% of the browser market and the remaning split across the remanining
browsers, which means that NS doesnt even hold the remaining 20% I wouldnt
even bother, but that is just me ;)
 
G

Guest

Thanks for your reply Alessandro. That's too bad that MS
decided to only support client side validation in IE
since NS and others do support the ECMAScript Javascript
standard. I guess global domination is a hard habit to
break. Why does it generate &nbsp; in place of the
validation controls, since this mangles the layout? Is
there a setting to prevent this, perhaps in web.config?

Thanks again.

Michael

P.S. you may be right about the penetration numbers but I
happen to know a number of people using Mozilla or NS 7
including my most recent client!
 
A

Alessandro Zifiglio

I have no idea but what goes on behind the scenes is that all those controls
are smart enough to detect the browser and render accordingly. so i guess
for ns they must have thought it were appropriate to render empty space on
the client and validation will take place on the server, and clientside
validation for IE only. If Client side validation in NS is important to you,
then you might want to check out peter blums validation controls. His is the
only that i know of and fairly cheap.

YOu might consider purchasing his package :
http://www.peterblum.com/VAM/Home.aspx
Thats a lot of features and being a control developer myself i think his
prices are fairly cheap.
Good luck Micheal. Glad i could help ;)
 
A

Alessandro Zifiglio

oh and on a side note, this is what he says about the browsers his
validation controls are supported client side:
a.. Client-side validation on IE, IE/Mac, Netscape 6+, Mozilla, Opera 7 and
Safari. (Microsoft only supports IE and IE/Mac.)
 
G

Guest

Thanks for your replies Alessandro. I now understand MS
validation control limitations. Peter Blum's controls
look vastly superior but since I'm not a corporate
developer the per site licensing is a bit steep. Maybe if
I get into an eCommerce site it would be worth it. Right
now just using asp.net to transform xml and to some minor
validation on low volume small business sites. Not much
of a margin to play with. I used to do all this stuff
with php for free!

Thanks again.
 

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

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,276
Latest member
Sawatmakal

Latest Threads

Top