[Javascript] form validation script

David S Levy dlevy at lancer-ins.com
Fri Mar 28 11:19:46 CST 2003


Thank you for your responses.  For those of you who were curious, I figured out why this script had trouble with the non-text inputs.  The script basically tests for the value of an input being an empty string.  This doesn't work for a checkbox because the proper test for a checkbox is to see whether it is checked, it returns the same value either way.  So value is pretty useless as a field filled/empty test.  The reason the script had trouble returning anything of significance from radio buttons is that it seems as though each radio button associated with a particular name is in itself an object(located within an array which goes by the radio name), similar to a textbox, as opposed to simply being a switch for the value of the radio button.  Therefore(I think) if I have a radio object name 'fred' with four radio buttons associated with it, there really is no object named 'fred', or at least no value associated with it, since 'fred' is an array.
  ----- Original Message ----- 
  From: Rodney Myers 
  To: [JavaScript List] 
  Sent: Friday, March 28, 2003 12:18 PM
  Subject: Re: [Javascript] form validation script


  David,

  Personally, while I much admire the layout facilities and CSS editing provided by MacroMedia I find their javascript often leaves something to be desired and avoid using it.

  I think your plan b of writing your own code sounds wise.

  Rodney

  David S Levy wrote:

    Hi, I'm having trouble with the following two functions.  They were generated by dreamweaver. 
  <snip>

    I can write a simpler and more proprietary script for this but am pretty confused as to why this one is not working.

    <snip>


-- 
PS. I have just bought a licence for Mike Chen's
BizAutomator. If you have to answer routine 
email queries from your sites or mailings then
you need this as much as I do. 
http://www.BizAutomator.com/rlbm51 

Rodney





------------------------------------------------------------------------------


  _______________________________________________
  Javascript mailing list
  Javascript at LaTech.edu
  https://lists.LaTech.edu/mailman/listinfo/javascript

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.evolt.org/pipermail/javascript/attachments/20030328/a2c2b02d/attachment.htm>


More information about the Javascript mailing list