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

Netscape validation problem

Hi. I've posted this question on another newsgroup, but I haven't received any answers..

I have a login page where users input userID and password and click a Login button. Before calling the login functions, I have to check the user ID and the password for invalid data. It works well in IExplorer, but it doesn't show the validation summary (displayed in a Javascript alert box) in Netscape.

This is what I have in the asp page:

<asp:textbox id="txtUserID" MaxLength="30" runat="server"></asp:textbox><asp:requiredfieldvalidator id="validUserID" runat="server" controlToValidate="txtUserID" ErrorMessage="User ID is required" Display="None"></asp:requiredfieldvalidator><asp:textbox id="txtUserPwd" MaxLength="30" runat="server"></asp:textbox><asp:requiredfieldvalidator id="validUserPwd" runat="server" ErrorMessage="Password is required" Display="None" ControlToValidate="txtUserPwd"></asp:requiredfieldvalidator><asp:button id="btnLogin" runat="server" Text="Login"></asp:button><asp:validationsummary id="validSummary" runat="server" DisplayMode="BulletList" HeaderText="The following errors ocured:" showsummary="false" ShowMessageBox="True"></asp:validationsummary>

This is what I have in my code-behind file:

Private Sub btnLogin_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnLogin.Click

If Not Page.IsValid Then
Return
End If

'Call the login function
End Sub

Does anyone have any idea why the validation summary doesn't show in netscape

TI
TM
Nov 18 '05 #1
2 1355
The client-side validation that the built-in validators are supposed to be
executing does not work in Netscape because of the way the relevant
javascript was written. Your server-side validation is not running because
you are not calling Page.Validate prior to evaluating Page.IsValid. Adding
a call to the Validate method prior to using the IsValid property should fix
the immediate problem.

BTW, even if Netscape were not an issue, you should be performing the
server-side validation properly since client-side validation is trivial to
bypass.

HTH,
Nicole
"TIBM" <an*******@discussions.microsoft.com> wrote in message
news:A6**********************************@microsof t.com...
Hi. I've posted this question on another newsgroup, but I haven't received
any answers...

I have a login page where users input userID and password and click a
Login button. Before calling the login functions, I have to check the
user ID and the password for invalid data. It works well in IExplorer, but
it doesn't show the validation summary (displayed in a Javascript alert
box) in Netscape.

This is what I have in the asp page:

<asp:textbox id="txtUserID" MaxLength="30"
runat="server"></asp:textbox><asp:requiredfieldvalidator id="validUserID"
runat="server" controlToValidate="txtUserID" ErrorMessage="User ID is
required" Display="None"></asp:requiredfieldvalidator><asp:textbox
id="txtUserPwd" MaxLength="30"
runat="server"></asp:textbox><asp:requiredfieldvalidator id="validUserPwd"
runat="server" ErrorMessage="Password is required" Display="None"
ControlToValidate="txtUserPwd"></asp:requiredfieldvalidator><asp:button
id="btnLogin" runat="server"
Text="Login"></asp:button><asp:validationsummary id="validSummary"
runat="server" DisplayMode="BulletList" HeaderText="The following errors
ocured:" showsummary="false"
ShowMessageBox="True"></asp:validationsummary>

This is what I have in my code-behind file:

Private Sub btnLogin_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnLogin.Click

If Not Page.IsValid Then
Return
End If

'Call the login functions
End Sub

Does anyone have any idea why the validation summary doesn't show in
netscape?

TIA
TM

Nov 18 '05 #2
Sorry, I hadn't noticed that you were using the message box approach for the
validation summary. There's an additional problem with this: the message
box is only shown when the form is submitted, at which point it appears
valid since client-side validation "passes" in Netscape. There is a
workaround, but it won't work for any client that has javascript enabled
since the message is displayed using a client-side window.alert call. A
more robust approach is use the in-place text display rather than the
message box for showing the validation summary.

HTH,
Nicole

"TIBM" <an*******@discussions.microsoft.com> wrote in message
news:43**********************************@microsof t.com...
Actually, it didn't work...
Any other ideas?
Thanks. TIBM

Nov 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: rez | last post by:
I find it rather frustrating that Netscape 4.x is "no longer supported:" http://help.netscape.com/products/client/communicator/reflib.html Same seems true with IE. How am I ever supposed to...
7
by: AnnMarie | last post by:
My JavaScript Form Validation doesn't work at all in Netscape, but it works fine in IE. I made some of the suggested changes which enabled it to work in IE. I couldn't make all the changes...
2
by: lawrence | last post by:
I thought I was fighting a PHP problem, so I asked about this on a PHP list, but they felt it was a Javascript problem, so I'm reposting a bit of the debate here. Could this Javascript, below,...
1
by: Mike George | last post by:
I am having a problem with dynamic validation controls. I have some code that uses an XSLT to transform an XMLDocument into HTML which creates ASP.NET validation controls dynamically (v 1.1). ...
3
by: Rick | last post by:
I have an interesting problem when I run the following code in Netscape (7.02) vs. IE. This page works great in IE and all my controls bring up the validation summary dialog box if the required...
5
by: raagz | last post by:
Hi, I am using the .NET validation controls for validating . The validation works fine with IE but none of them work with Netscape 6 browser. Do i have to configure something in vS.NET to...
7
by: David Laub | last post by:
I have stumbled across various Netscape issues, none of which appear to be solvable by tweaking the clientTarget or targetSchema properties. At this point, I'm not even interested in "solving"...
3
by: Masoud Amiri | last post by:
Hi every one I wanted to use RegularExpressionValidator and other validators in my asp.net pages. when I use internet explorer as a browser it works fine but when I use netscape or other...
0
by: interuser | last post by:
I have an existing large application that uses validators. I have a problem with the client side validators not working on netscape (and any browser other than IE). As you may already know, the...
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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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...

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.