473,770 Members | 5,880 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Firefox Validation Issue - not the standard document.[all] problem!

I have a page that has some required field validators created in the
aspx, and other validators created in the Page_Load event.

In IE, all validation works as expected. In Firefox, ASPX validators
work fine, but the validators created in the code-behind do not.

Am I adding the validators to the wrong control on the page? Right now
I'm finding the main form control and adding them to that. Adding to
Page.Validators didn't work.

ASPX validators:

<asp:Validation Summary ID="vlSummary" Runat="server" ShowSummary="Tr ue"
DisplayMode="Bu lletList" HeaderText="Ple ase correct the following
error(s):" />

<asp:RequiredFi eldValidator ID="vrqFirstNam e" Runat="server"
ControlToValida te="txtFirstNam e" ErrorMessage="F irst Name is required"
Display="None" />

<asp:RequiredFi eldValidator ID="vrqLastName " Runat="server"
ControlToValida te="txtLastName " ErrorMessage="L ast Name is required"
Display="None" />

<asp:RequiredFi eldValidator ID="vrqAddress " Runat="server"
ControlToValida te="txtAddress " ErrorMessage="A ddress is required"
Display="None" />
Code-behind (called from Page_Load method):
private void AddReqFieldVali dator(string fld, string msg_fld)
{
System.Web.UI.W ebControls.Requ iredFieldValida tor rfv = new
System.Web.UI.W ebControls.Requ iredFieldValida tor();
rfv.ID = "vrq" + fld;
rfv.ControlToVa lidate = fld;
rfv.ErrorMessag e = msg_fld + " is required";
rfv.Display = ValidatorDispla y.None;
rfv.EnableClien tScript = true;
Page.FindContro l("frmPage").Co ntrols.Add(rfv) ;
}

Nov 19 '05 #1
4 1429
client script validation is only supported for IE, for other browser, only
serverside validation works. for serverside validation to work, you must
call the IsValid property or the Validate() method in the codebehind.

-- bruce (sqlwork.com)
this requires your copdebehind
"andersoj" <je**********@g mail.com> wrote in message
news:11******** **************@ g49g2000cwa.goo glegroups.com.. .
I have a page that has some required field validators created in the
aspx, and other validators created in the Page_Load event.

In IE, all validation works as expected. In Firefox, ASPX validators
work fine, but the validators created in the code-behind do not.

Am I adding the validators to the wrong control on the page? Right now
I'm finding the main form control and adding them to that. Adding to
Page.Validators didn't work.

ASPX validators:

<asp:Validation Summary ID="vlSummary" Runat="server" ShowSummary="Tr ue"
DisplayMode="Bu lletList" HeaderText="Ple ase correct the following
error(s):" />

<asp:RequiredFi eldValidator ID="vrqFirstNam e" Runat="server"
ControlToValida te="txtFirstNam e" ErrorMessage="F irst Name is required"
Display="None" />

<asp:RequiredFi eldValidator ID="vrqLastName " Runat="server"
ControlToValida te="txtLastName " ErrorMessage="L ast Name is required"
Display="None" />

<asp:RequiredFi eldValidator ID="vrqAddress " Runat="server"
ControlToValida te="txtAddress " ErrorMessage="A ddress is required"
Display="None" />
Code-behind (called from Page_Load method):
private void AddReqFieldVali dator(string fld, string msg_fld)
{
System.Web.UI.W ebControls.Requ iredFieldValida tor rfv = new
System.Web.UI.W ebControls.Requ iredFieldValida tor();
rfv.ID = "vrq" + fld;
rfv.ControlToVa lidate = fld;
rfv.ErrorMessag e = msg_fld + " is required";
rfv.Display = ValidatorDispla y.None;
rfv.EnableClien tScript = true;
Page.FindContro l("frmPage").Co ntrols.Add(rfv) ;
}

Nov 19 '05 #2
Then why do some of the client-side validators work in Firefox? I'd
buy that if none of them worked in Firefox at all.

Nov 19 '05 #3
Also, I AM calling the IsValid property in the codebehind.

Nov 19 '05 #4
TJS
I have found asp: validators to be unreliable with Firefox, in general,
regardless of codebehind.
That's even with browser detection and isvalid checks.

"andersoj" <je**********@g mail.com> wrote in message
news:11******** **************@ g49g2000cwa.goo glegroups.com.. .
I have a page that has some required field validators created in the
aspx, and other validators created in the Page_Load event.

In IE, all validation works as expected. In Firefox, ASPX validators
work fine, but the validators created in the code-behind do not.

Am I adding the validators to the wrong control on the page? Right now
I'm finding the main form control and adding them to that. Adding to
Page.Validators didn't work.

ASPX validators:

<asp:Validation Summary ID="vlSummary" Runat="server" ShowSummary="Tr ue"
DisplayMode="Bu lletList" HeaderText="Ple ase correct the following
error(s):" />

<asp:RequiredFi eldValidator ID="vrqFirstNam e" Runat="server"
ControlToValida te="txtFirstNam e" ErrorMessage="F irst Name is required"
Display="None" />

<asp:RequiredFi eldValidator ID="vrqLastName " Runat="server"
ControlToValida te="txtLastName " ErrorMessage="L ast Name is required"
Display="None" />

<asp:RequiredFi eldValidator ID="vrqAddress " Runat="server"
ControlToValida te="txtAddress " ErrorMessage="A ddress is required"
Display="None" />
Code-behind (called from Page_Load method):
private void AddReqFieldVali dator(string fld, string msg_fld)
{
System.Web.UI.W ebControls.Requ iredFieldValida tor rfv = new
System.Web.UI.W ebControls.Requ iredFieldValida tor();
rfv.ID = "vrq" + fld;
rfv.ControlToVa lidate = fld;
rfv.ErrorMessag e = msg_fld + " is required";
rfv.Display = ValidatorDispla y.None;
rfv.EnableClien tScript = true;
Page.FindContro l("frmPage").Co ntrols.Add(rfv) ;
}

Nov 19 '05 #5

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

Similar topics

4
3695
by: Dave Blair | last post by:
Hi, I have a problem with our intranet, we are planning to install Firefox instead of Internet Explorer onto some new PCs. However, we can't get the following JavaScript to work in Firefox and similar code is used in lots of the intranet stuff. The code should bring up a message box with a warning and not allow the user to continue unless they have filled in the entry in an html form (the form is called 'myauthor').
15
19890
by: Dan | last post by:
Hi. I've got the following line of code which works fine in IE ... line_1_numbers = document.getElementsByTagName ('table').rows (0).cells (0).innerText; But it Firefox, it barks saying: "Error: document.getElementsByTagName("table").rows is not a function"
41
2656
by: Gérard Talbot | last post by:
Cross-posted to: comp.infosystems.www.authoring.html and alt.html Followup-to: comp.infosystems.www.authoring.html 1- One day, I stumbled across a website that offers to validate webpages. What was really special about that site is that the validation service was available in Russian, German, Spanish and English. Now, I can't find this site anymore. I did search google. Do you know such site? What's its url? 2- Generally speaking, the...
7
2875
by: A.M | last post by:
Hi, I have a validation control in my page that upon any invalid data, it disables all buttons in the page. basicly i don't have any postback in the page if the validator finds any error. How can have the validator just disable certain control's postback and other part of page continue their functionality. Thanks,
3
2095
by: TJS | last post by:
I am finding that the serverside requiredvalidator doesn't fire in the firefox browser, and user request proceeds through to my updateProfile method. Validation is working correctly in the IE browser. Anyone seen this problem or have any ideas why this might be occurring ?? (I have web.config browsercaps updated from http://slingfive.com/ ) code: =========
45
4748
by: Pat | last post by:
its seems asp.net validation doesn't fire when using FireFox? Tested a page and it doesn't fire. It seems the javascript doesn't fire Any ideas?
1
3950
by: Hong Hao | last post by:
Recently, I was trying to modify an existing aspx page when client-side validation on that page stopped working. I searched this group and the web in general and found that other people have had the same issue. However, none of the suggested fixes solved my particular problem. I tracked down the cause of the problem, which is related to aspx page parser's handling of controls inside html comments. The problem may be quite common and well...
2
9566
by: sveinn | last post by:
Hi all, I've read through this group searching for an answear about this problem. Few have come close but not quite what I need. My problem is this: I'm using Ajax to fetch a new table with input boxes. I then take the innerHTML from my <div> and add the new table to the existing one/s. What happens in FireFox is that all values in other tables input boxes
1
1458
by: rjdougan | last post by:
I am not a developer but need some help with scripts for a client. I have a script to handle form validation and one that handle mouseover on menu. The form validation script works fine by it self in both Firefox and IE. When the menu mouseover script is introduced the form validation only works in firefox not in IE. Here is the form validation script ---------------------------------- function verifyForm(form_id) {
0
9432
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10059
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9873
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8891
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7420
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6682
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
3974
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3578
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2822
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.