Required Field Validator does not work in other browser.

I am using ASP.net 1.1, vb 2003.

Does anyone of you experience that the required field validator does not work in other browser like:
google chrome, safari, and netscape?


I have this problem and need to make it compatible with other browser...

Any ideas how to solve this problem?

your input is greatly appreciated.

Jack

LVL 15
JackOfPHAsked:
Who is Participating?
 
Rajkumar GsConnect With a Mentor Software EngineerCommented:
Check whether this will help you
http://www.vbforums.com/showthread.php?t=550047

Raj
0
 
Dhanasekaran SengodanConnect With a Mentor Commented:
1) Just call method in Page_ Load

Page.Validate();

or

2) Add Button_Click Event

 if (!Page.IsValid)
{
return;
}
0
 
JackOfPHAuthor Commented:
@dhansmani

Have patient, but I have to ask...

Why do I need to put Page.validate?
And what does putting page.validate in the page_load in other browser?
0
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
Dhanasekaran SengodanCommented:

ASP.NET 1.1 usually generates client-side script geared towards IE 4 and later using the IE DOM and not the more cross browser compatible W3C DOM, therefore with the normal settings browsers like
Mozilla will not get that client-side script at all. Server-side validation on postback should nevertheless work independent of the browser and any client-side script ASP.NET might or might not generate.

That was what I figured and as soon as I added the test for IsValid, it seems to work fine.
0
 
JackOfPHAuthor Commented:
if (!Page.IsValid)
{
return;
}

So, if I convert this in vb...

It should be like this?

If Not Page.IsValid
{
return
}
0
 
Dhanasekaran SengodanCommented:
Page.Validate(); method is invoked when a user clicks any ASP.NET server control that has the CausesValidation property set to true, which is the default.
0
 
Dhanasekaran SengodanCommented:
If Not Page.IsValid Then
 Return
End If

0
 
JackOfPHAuthor Commented:
Do I need to test if the Page.IsValid or not?



0
 
Dhanasekaran SengodanCommented:
If you want to validate, u need to use Page.IsValid
0
 
masterpassCommented:
I have added a .js File ....

If you are using a scriptmanager , add the JS file  ref as given in code

otherwise add the JS file to the HEAD section

Hope this helps...
<asp:ScriptManager ID="ScriptManager1" runat="server" EnablePageMethods="true">
  <Scripts>
    <asp:ScriptReference Path="~/SafariFix.js" />
   </Scripts>
</asp:ScriptManager>

Open in new window

SafariFix.js
0
 
JackOfPHAuthor Commented:
@masterpass,

Can you explain to me, what the script does?
0
 
masterpassConnect With a Mentor Commented:
See, the issue you are facing were faced by many others using safari2 and 3 but not 4. This was the simplest solution some body came up with and hence forth used as a solution. I had the issue some time back of the required field validator and this is how I got it rectified. The issue is because the safari is considered as a webkit

further reading : http://blog.lavablast.com/post/2008/10/20/Gotcha-WebKit-%28Safari-3-and-Google-Chrome%29-Bug-with-ASPNET-AJAX.aspx
0
 
JackOfPHAuthor Commented:
Currently testing which will solve the issue...

Please, have patience...

Thanks,

Joseph
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.