Path: csiph.com!usenet.pasdenom.info!aioe.org!.POSTED!not-for-mail From: Stan Weiss Newsgroups: comp.lang.javascript Subject: Re: How to Pass variable name to a function Date: Thu, 12 Apr 2012 14:03:01 -0400 Organization: Aioe.org NNTP Server Lines: 32 Message-ID: <4F8718D5.170C97BC@erols.com> References: <4F85B0AE.A1E9FFD8@erols.com> NNTP-Posting-Host: 0LFKx0y469vyintJTg0+6A.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org X-Mailer: Mozilla 4.8 [en] (Windows NT 5.0; U) X-Accept-Language: en X-Notice: Filtered by postfilter v. 0.8.2 Xref: csiph.com comp.lang.javascript:13355 Thank to all that posted for your help. 1) The reason for only posting code snippets was that form does calculation of someone else's equations which I could not share. 2) This is fully functional and working but used method which were not generalized. That was the reason for the inquiry This is what I have now. function numeric( field, fallback, name ) { var num = parseFloat(field); if (isNaN(field)) { alert(name + " is not numeric"); return fallback; } else return num; } Valve Diameter in Millimetres When I have more time I will look into implementing what Stefan suggested about replacing the "isNaN" Thanks again, Stan