Hello-
I am inquiring on the approach to take to perform data validation on two fields populated using an Editable Control. I need to ensure that for each Editable row that is inserted, that there is data in these two fields. I do not want to make the fields mandatory, as there appears to be an issue with Firefox as it relates to editable rows with drop down values.
Any help would be greatly appreciated.
John H.
I am inquiring on the approach to take to perform data validation on two fields populated using an Editable Control. I need to ensure that for each Editable row that is inserted, that there is data in these two fields. I do not want to make the fields mandatory, as there appears to be an issue with Firefox as it relates to editable rows with drop down values.
Any help would be greatly appreciated.
John H.
RE: field validation on Editable
Generally we would recommend using the built in validation with the mandatory setting in order to achieve this.
Can you provide some more details on why you think this is not suitable? What is the problem you are seeing in Firefox?
Hopefully we can get this resolved, as using the in built validation would be by far the simplest option.
Regards,
Gerard
RE: field validation on Editable
We are having a problem when trying to submit the form when the mandatory setting is used on two fields. I have attached a screen shot that shows it is treating the last row as a row that should be inserted. Firefox 3.6 up through 7.0 has this issue. The latest version of Firefox does not have this issue. Have you ever seen this issue with Firefox? IE is not a problem either.
John H.
Fresno,CA
[attachment=0]3.png[/attachment]
RE: field validation on Editable
A little more information... whatever the issue is... Firefox 10 forward does not have the issue.
John H.
Fresno,CA
RE: field validation on Editable
Thanks for the extra information. What versions of Firefox do you need to support for you application because, as you mention, the newer versions do not have the problem?
Regardless, I have looked into it, and the issue has been resolved for the next release. In the meantime, if you need to support older Firefox versions, then add a new script file to your page, after the editabletable.js one.
Add the following content to this new file. This overrides one of the functions in the editabletable.js script file with the latest version, which does not have the problem in Firefox.
/** * Checks if the given field is actually contained with an insert new entry row * for an editable table control. * @param field The HTML field to check * @return boolean value, true of the field is within a new entry row, false otherwise. */ hyf.editabletable.checkNewRowField = function(field) { if (dojo.hasClass(field, hyf.editabletable.classes.insertRow)) { return true; } else if (field.parentNode != null) { return hyf.editabletable.checkNewRowField(field.parentNode); } else { return false; } }
I hope this helps.
Regards,
Gerard
RE: field validation on Editable
Yes, we may need to continue support of older versions of Firefox due to certain versions of Oracle/systems that we have in our shop. Oracle has only certified up through Firefox 7. Your fix will work for me.
We can close this one!
Thank you for the update!
John H.