I would try using THIS as the name, or pass it to the function as such: onblur="myfunc(this);" <----- USING THIS onblur="myfunc(myField);" <----- PASSING NAME
function myfunc(thisObj){ if ((isNan(thisObj.value)) // Whatever else } THIS would be the easiest way, especially if you're dynamically creating that field using a document.write() statement. I'm not a JavaScript expert, so don't quote me on this, but I don't THINK that objects get created in the DOM if they're created with a document.write() statement. At least, I've had trouble using literal references to form objects created this way - using THIS circumvents the issue. If I'm wrong about the object not being in the DOM when created through document.write() someone please correct me, I'd like to know this for certain. It seems like that would be incorrect and that it WOULD be in the DOM, but I have never been able to get a name reference to work correctly with elements created through document.write(). Joshua Miller Head Programmer / IT Manager Garrison Enterprises Inc. www.garrisonenterprises.net [EMAIL PROTECTED] (704) 569-9044 ext. 254 ************************************************************************ ************* Any views expressed in this message are those of the individual sender, except where the sender states them to be the views of Garrison Enterprises Inc. This e-mail is intended only for the individual or entity to which it is addressed and contains information that is private and confidential. If you are not the intended recipient you are hereby notified that any dissemination, distribution or copying is strictly prohibited. If you have received this e-mail in error please delete it immediately and advise us by return e-mail to [EMAIL PROTECTED] ************************************************************************ ************* -----Original Message----- From: Nick de Voil [mailto:[EMAIL PROTECTED] Sent: Thursday, March 06, 2003 10:39 AM To: CF-Talk Subject: Re: JS problem Emmet > if ((isNan(document.CartForm.myField.value)) || Try if ((isNan(document.CartForm.elements[myField].value)) || Nick ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Get the mailserver that powers this list at http://www.coolfusion.com Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4