r0adhog wrote:
I guess I could do it after the submit, was looking to do something
like If x = "true" then
document.MyForm.all("FieldName").value =
CleanedUp(document.MyForm.all("FieldName").value)
document.MyForm.summit()
End If
Will that work?
It pains me to say, "probably" (except for the misspelled submit() method),
but it certainly depends on intercepting the submission.
It pains me for three reasons: (1) VBScript on the client, (2) the use of
..all, and (3) referencing a collection with parentheses instead of brackets.
Internet Explorer lets you get away with all three, but I don't consider
that a good thing.
Generally speaking, form element references ought to look like this:
document.MyForm.elements["FieldName"]
If you don't use funky characters for naming your fields (and don't collide
with the FORM element's property/method namespace, you can get away with
this:
document.MyForm.FieldName
Examples that require the former:
<INPUT NAME="Address(2)"> **
<INPUT NAME="submit"> ***
I object to VBScript on the client for religious reasons, FWIW.
**I've actually seen this!!
***Probably one of the most common newbie errors
--
Dave Anderson
Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms. Please do not contact
me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.