jepper
 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
 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
 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
 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
 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
 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
 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
 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
 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
 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
 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
 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
 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
 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
 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
 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
 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
 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) |
|
|