alkemyst
No Lifer
I am trying to do something like this in my form:
<input TYPE="text" NAME="bHphone" VALUE="<%= mybPN %>" onFocus="javascript:getIt('bHphone',this)">
my getIt function looks like:
function getIt(fieldname,m){
n=m.name;
//p1=document.forms[0].elements[n]
p1=m
ValidatePhonenumber(fieldname)
}
My code works fine if I refer to document.myFormName.bHphone.value
I don't use javascript alot, but this I need to use on 4 fields on one form and 2 fields on another. Writing 6 separate functions (just changing the formname and fieldnames) would be simple, but redundant.
Anyone know a good way to do this?
Å