close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Validation Toolkit Required Field Error

Thread began 8/19/2009 7:58 pm by jmpuyo250448 | Last modified 8/20/2009 9:29 am by jmpuyo250448 | 2150 views | 1 replies


Validation Toolkit Required Field Error


I had an error when trying to apply a Required/Not Blank/Selection Made validation to a text field or any other tag. After taking a look at the code that generated the error (Line 43 on WAFV_Required_C.js file) -> error: tagType undefined.

I managed to make the validation work by adding a line of code to this function on the file:

function applyBehavior() {
var theReference = "";
if (!isCommand) {
theReference = document.theForm.formElement.options[document.theForm.formElement.selectedIndex].text
else {
theReference = theElement;
var theForm = theReference.substring(0,theReference.indexOf("."));
var theField = theReference.substring(theReference.indexOf(".")+1);
theValue = "document.getElementById('" + theForm +"')."+theField;
var tagType = theElementType; //Added this line of code
if (tagType.toLowerCase()!="select" && tagType.toLowerCase()!="checkbox" && tagType.toLowerCase()!="radio") {
var theValue = theValue + ".value";

var errorMsg = encodeAlert(document.theForm.errorMSG.value);
var stopIt = getRadioVal(document.theForm.ErrorResult);
var trimWhite = !document.theForm.trimCHK.checked;
var theFocus = false;
if (isCommand) {
if (theElementType != "input.hidden") {
theFocus = theValue;
if (theElementType == "radio") {
theFocus += "[0]";
else if (document.theForm.formElement.options[document.theForm.formElement.selectedIndex].value == "true") {
theFocus = "document." + document.theForm.formElement.options[document.theForm.formElement.selectedIndex].text;
if (tagType == "radio")
theFocus += "[0]";
if (isCommand) {
return "WAValidateRQ("+"document." + theElement +",'"+errorMsg+"',"+theFocus+","+stopIt+","+trimWhite+",'"+tagType+"')";
else {
return "WAValidateRQ("+"document." + document.theForm.formElement.options[document.theForm.formElement.selectedIndex].text+",'"+errorMsg+"',"+theFocus+","+stopIt+","+trimWhite+",'"+tagType+"')";

The line of code added was:

var tagType = theElementType;

in order to avoid the tagType not defined.

let me know if this is the correct solution to the problem.?

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question





Ease of use


security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...