Can you be more specific? Do you mean using Validator? or just invoking event handlers (onclick, etc.)? or dynamically generating JavaScript?
Okay, I got the impression from a co-worker that the Validator was buggy, but in a conversation I had with him just now left me with more positive impression. I do plan to check it out since there is good documentation.

Originally I was trying to figure out how to use javascript in the example below, where the toUpperCase method allow sa user to enter a lower case letter, even though it is stored in upper case on the database. What I am having trouble figuring out is how to allow javascript to *return* a value that retains the upper case conversion.

<script language=JavaScript>
function validateForm(Input_PO)

var y = Input_PO.PONum.value.substring(0, 1).toUpperCase()

if (IsNumeric(y) == true || y == "X" || y == "Y" || y == "Z")
{return true
}
else
{
alert("First character of PONum must be numeric or X, Y or Z")
return false
}

return true
}
//-->
</script>

<html:form onsubmit="return validateForm(this)" action="/CO1_Validate_PONum" focus="PONum">
<table>
<tr>
<td align="center">
<table width="100%">
<tr>
<th align="right">Enter PO Number:</td>
<td><html:text property="PONum" size="20"/></td>
</tr>
<tr>
<td colspan="2"><center><html:submit value="submit"><bean:message key="button.ok"/>
</html:submit></center></td>
</tr>
</table>
</td>
</tr>
</table>
</html:form>


--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>



Reply via email to