JackOfPH
asked on
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
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
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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.
ASKER
if (!Page.IsValid)
{
return;
}
So, if I convert this in vb...
It should be like this?
If Not Page.IsValid
{
return
}
{
return;
}
So, if I convert this in vb...
It should be like this?
If Not Page.IsValid
{
return
}
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.
If Not Page.IsValid Then
Return
End If
Return
End If
ASKER
Do I need to test if the Page.IsValid or not?
If you want to validate, u need to use Page.IsValid
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...
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>
SafariFix.js
ASKER
@masterpass,
Can you explain to me, what the script does?
Can you explain to me, what the script does?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Currently testing which will solve the issue...
Please, have patience...
Thanks,
Joseph
Please, have patience...
Thanks,
Joseph
ASKER
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?