Join our DNN Community    (Newsletter, Tips, Tricks and Forums for DNN Skins & Modules)

 


 
Microsoft Gold Certified Partner - DNN Benefactor

DotNetNuke Powered! 


Tuesday, December 02, 2008 Register · Login · Contact · Search:  
Company Solutions Portfolio Contact
Forums
General
The ever-powerful ListX module forum. Post your questions, new configuration ideas and reviews.
Subject: Firefox Validation Bug or Not

You are not authorized to post a reply.   
Author Messages
jepper
Superweight
Posts:216

05/15/2007 7:06 AM Alert 
I am using the validation on a form and it works fine with IE but in Firefox the message box shows but the message in the box is "undefined". Is this a bug or did I do something wrong? Below is the span tag I used to display the messagebox.

Thanks,
James


<span showsummary="True" showmessagebox="True" displaymode="BulletList" headertext="The following errors were identified:" style="color:Red;display:none;"></span>
rgallais
Cruiserweight
Posts:147

05/15/2007 11:53 AM Alert 
Hi James,

Did you specify a correct id for your field?
<TR>
<TD style="width: 200px;">YourField<span id="vpropertyYourField" controltovalidate="propertyYourField" errormessage="YourField is a required field" display="Dynamic" evaluationfunction="RequiredFieldValidatorEvaluateIsValid"></span>
</TD>
<TD>
<INPUT type=text style='width: 100%; border: 1px solid black;' maxlength=50 id="propertyYourField" name="propertyYourField">
</TD>
</TR>

Romain Gallais
Business Intelligence Force, Inc. (bi4ce)
jepper
Superweight
Posts:216

05/15/2007 5:53 PM Alert 
Thanks for replying Romain. I think everything is correct below is the listing for the select statement I used.


<select name="ddTransType" id="ddTransType">
<option value="">--Select Transmission--</option>
{SUBQUERY, Name="QryTRANS", Query="select TransDesc from Transactions Order by TransDesc",
Format="<option value='[TransDesc]'>[TransDesc]</option>",
SelectedFormat="<option value='[TransDesc]' SELECTED>[TransDesc]</option>",
SelectedField="TransDesc",
SelectedItems="[FORMAT,[ddTransType,Form],{ISEMPTY:[TRANSACTION,Table1]}]",
UseCache="False"}
</select><span id="vddTransType" controltovalidate="ddTransType" errormessage="Must select a Transaction" display="Dynamic" evaluationfunction="RequiredFieldValidatorEvaluateIsValid" initialvalue="" style="color:Red;display:none;">Must select a Transaction</span>
rgallais
Cruiserweight
Posts:147

05/16/2007 10:33 AM Alert 
Hi James,

Your statement looks good and also I never noticed any issue with the validation using FF.

-Did you try this on a separate lisX form?
-Could you replace your subquery with this and tell me if you have still the javascript error?
{SUBQUERY,Name="States",Query="select * from Lists where ListName = 'Region' order by SortOrder,Text",Format="<OPTION value='[Value]'>[Text]</OPTION>",UseCache="False"}


Regards

Romain Gallais
Business Intelligence Force, Inc. (bi4ce)
jepper
Superweight
Posts:216

05/16/2007 12:38 PM Alert 
Romain I tried your SUBQUERY and also tried a different ListX form and the same thing happened. It works just fine in IE but FireFox message box comes back with "undefined" in the box.

James
rgallais
Cruiserweight
Posts:147

05/16/2007 12:45 PM Alert 
Could you post your listX configuration?
Otherwise do you have a public access to your form?

Thanks

Romain Gallais
Business Intelligence Force, Inc. (bi4ce)
jepper
Superweight
Posts:216

05/16/2007 5:44 PM Alert 
Actually you can see the same result with the Doctor Management LP. Just place the span tag I put in the intial post in the physician entry page and you will get the same message box. I made no changes to the LP except for adding the above <span> tag below the "Add" "Cancel" buttons. I am also using the latest version of Firefox.

James
rgallais
Cruiserweight
Posts:147

05/17/2007 11:34 AM Alert 
Hi James,

My mistake, it is a listX validation bug, sorry about that.
We plan to fix that in the next release, which should be ready within the next week.

In the mean time, you can fix that by yourself:
-Go to the xValidation.js under DesktopModule/ListX folder and edit it
-Look for the 'alert(s);' line (which should be the last one)
-Replace the 's = span.innerText;' expression by 's = span.innerHTML.replace(/<(B|b)(R|r)(\s)*(\>|>)/g, "\n");'

This fix works in both IE and FF.

Regards

Romain Gallais
Business Intelligence Force, Inc. (bi4ce)
jepper
Superweight
Posts:216

06/14/2007 12:21 AM Alert 
Hate to revisit this issue but could you tell me why the following only validates with IE and not FF?


<tr class="Manager_Footer">
<td nowrap>First Name: <span style="COLOR: red;">*</span></td>
<td width=100% colspan="2"><input name="txtFirstName" type="text" id="txtFirstName" style="WIDTH: 50%;"><span id=vtxtFirstName name=vtxtFirstName controltovalidate="txtFirstName" errormessage="Please Enter Your First Name" display="Dynamic" evaluationfunction="RequiredFieldValidatorEvaluateIsValid" initialvalue="" style="color:Red; display: none;"> First Name Is Required</span></td>
</tr>
<tr class="Manager_Footer">
<td nowrap>Last Name: <span style="COLOR: red;">*</span></td>
<td colspan="2" nowrap><input name="txtLastName" type="text" id="txtLastName" style="WIDTH: 50%;"><span id=vtxtLastName name=vtxtLastName controltovalidate="txtLastName" errormessage="Please Enter Your Last Name" display="Dynamic" evaluationfunction="RequiredFieldValidatorEvaluateIsValid" initialvalue="" style="color:Red; display: none;"> Last Name Is Required</span></td>
</tr>
<tr class="Manager_Footer">
<td nowrap>Email Address: <span style="COLOR: red;">*</span></td>
<td colspan="2" nowrap><input name="txtEmail" type="text" id="txtEmail" style="WIDTH: 60%;"><span id="vtxtEmail" controltovalidate="txtEmail" errormessage="Enter Email Address in the proper format" display="Dynamic" evaluationfunction="RegularExpressionValidatorEvaluateIsValid" validationexpression= "^([a-zA-Z0-9_\-\.]+)@([a-zA-Z0-9_\-\.]+)\.([a-zA-Z]{2,5})$" style="color:Red;display:none;">Enter Email Address in the proper format</span>
<span id=v2txtEmail name=vtxtEmail controltovalidate="txtEmail" errormessage="Please Enter A Valid Email Address" display="Dynamic" evaluationfunction="RequiredFieldValidatorEvaluateIsValid" initialvalue="" style="color:Red; display: none;"> Email Address Is Required</span>
</td>
</tr>
<tr class="Manager_Footer">
<td rowspan="3" nowrap>Phone:</td>
<td nowrap>Home: <span style="COLOR: red;">*</span></td>
<td nowrap width=100%><input name="txtHomePhone" type="text" id="txtHomePhone2"><span id=vtxtHomePhone name=vtxtHomePhone controltovalidate="txtHomePhone" errormessage="Please Enter Your Home Phone Number" display="Dynamic" evaluationfunction="RequiredFieldValidatorEvaluateIsValid" initialvalue="" style="color:Red; display: none;"> Home Phone Number Is Required</span></td>
</tr>
<tr class="Manager_Footer">
<td nowrap>Cell:</td>
<td nowrap><input name="txtCellPhone" type="text" id="txtCellPhone2"></td>
</tr>
<tr class="Manager_Footer">
<td nowrap>Fax:</td>
<td nowrap><input name="txtFaxPhone" type="text" id="txtFaxPhone"></td>
</tr>
<tr class="Manager_Footer">
<td nowrap>Comments</td>
<td width=100% colspan="2"><textarea rows=5 width=100% style="WIDTH: 100%;" id="txtComment" name="txtComment"></textarea></td>
</tr>
<tr class="Manager_Footer">
<td nowrap colspan=3 width=100% align=center><a onclick="if (typeof(Page_SmartValidate) == 'function') return Page_SmartValidate();" language="javascript" {ACTION,,Submit,,Message}><img border='0' src='http://dnn.bi4ce.com/[PortalPath,System]/Images/SubmitButton.gif'></a><br>
<span showmessagebox="True" displaymode="BulletList" headertext="The following errors were identified:" style="color:Red;display:none;"></span>
</td>
</tr>
jepper
Superweight
Posts:216

06/15/2007 12:21 AM Alert 
Just to let you know I have changed the xValidation.js file and other validation pages work but not this one.
dcampbell
Heavyweight
Posts:197

06/15/2007 1:26 PM Alert 
Try removing the validator for home phone.. it seems to work as soon as I do that.. but I don't really understand why as you have other required field validators there.

Hope this helps Dave

Dave Campbell
Software Engineer
Business Intelligence Force, Inc. (bi4ce)
jepper
Superweight
Posts:216

06/15/2007 2:47 PM Alert 
Thanks Dave,
Acutally the ID for the input was "txtHomePhone2" and the validator was looking for "txtHomePhone". Sometimes it just takes someone else looking at the stupid things I do find what is wrong.

Thanks again.
James
Michelle
Welterweight
Posts:43

06/27/2007 10:23 AM Alert 
And how do I compare two dates with CompareValidatorEvaluateIsValid ?

From <INPUT NAME="txtStartDate" TYPE="text" VALUE=""> until <INPUT NAME="txtEndDate" TYPE="text" VALUE="">

Here the user can enter two dates. I want to check, if the end date is later than the start date.

Can anyone help?

Thank you
Michelle

Michelle Chan
pmanda
Superweight
Posts:267

06/27/2007 12:03 PM Alert 
This is how we can compare two fields.

<span group="Credentials" id="vpropertyConfirmPassword"
controltovalidate="propertyCPassword"
controltocompare="propertyPassword"
controltohookup="propertyPassword"
errormessage="Password values must match" display="Dynamic" evaluationfunction="CompareValidatorEvaluateIsValid" initialvalue="" style="color:Red;display:none;">*</span>

Praveena Manda
Software Engineer
Bi4ce,Inc
Cliffy
Flyweight
Posts:2

08/28/2008 4:33 PM Alert 
Sorry to resurrect an old post.

<div class='NTForums_Quote'>
My mistake, it is a listX validation bug, sorry about that.
We plan to fix that in the next release, which should be ready within the next week.

In the mean time, you can fix that by yourself:
-Go to the xValidation.js under DesktopModule/ListX folder and edit it
-Look for the 'alert(s);' line (which should be the last one)
-Replace the 's = span.innerText;' expression by 's = span.innerHTML.replace(/<(B|b)(R|r)(\s)*(\>|>)/g, "\n");'</div>

Has this listx validation bug been fixed? I have a form that works fine in ie7 but in firefox nothing happens on submit - no validation and form does not submit even if there's no validation errors.
I have looked at the xValidation.js and it did not have the above change. I tried adding it but makes no difference.

I am using NukeDK 1.9.9.4 on DNN 4.8.4
robert_chumley
Please Wait...
Posts:595

09/09/2008 9:36 AM Alert 
Can you run this in firebug and see if there are any javascript errors?
Thanks,

Robert Chumley
r2integrated (formally bi4ce)
Cliffy
Flyweight
Posts:2

09/09/2008 3:16 PM Alert 
Reading other threads I found i didn't have both 'id' and 'name' attributes in every element. Once I added that it works fine.
bgates
Heavyweight
Posts:197

10/05/2008 11:42 AM Alert 
In general, ALL form elements should have both 'name' and 'id' attributes, thanks to the differences in browsers and JS implementations.

Bob Gates
Business Intelligence Force, Inc. (bi4ce)
You are not authorized to post a reply.
Forums > Bi4ce.Modules.ListX > General > Firefox Validation Bug or Not



ActiveForums 3.6
Latest Post
 
At R2integrated (formerly Bi4ce), we take support seriously.  That's why we support our customers and DNN community with daily monitoring from our experienced engineering team.  We ask that the first step taken is to read the relevant documentation and support forums prior to submitting any questions that may already be available or have been answered.  We ask that you review the documentation that we provide for our products before posting a question.

The Forums are for our customers to chat, exchange ideas and strategies, and submit feedback.  Please be sure to perform keyword searches for previous related forum responses.

To be helpful when submitting a new item, please include the following: 
  1. DNN Version
  2. Module Version
  3. Admin Log Viewer Information
  4. Environment detail: Operating system, .NET framework version, database and version, IIS version, Browser version (if appropriate)
We always try to respond quickly and monitor the forums daily during business hours (EST).  Occasionally, requests for a specific project requirement may not apply for the free support offered. For project specific support please submit via our Information Request form.

Thank you for using our Forums.

Click here to register for the Forums
 
© 2008 by R2integrated (formerly Bi4ce) | DNN® is a registered trademark of DotNetNuke Corporation