Results 1 to 2 of 2
  1. #1
    2 Star Lounger
    Join Date
    Apr 2001
    Coppell, Texas, USA
    Thanked 0 Times in 0 Posts

    JavaScript getVal() function for form elements

    Attached is a zip file containing one HTML page with a demo of the JavaScript function getVal() that I referred to in <post#=190752>post 190752</post#> on this board.

    The form elements in the demo all use the getVal() function to display their current value. When you change the value of a form element, you should get an alert with the new value. I've tested this function with IE, Opera, and Netscape, but not all versions. So let me know if you find something that doesn't work and we'll see if we can fix it. In the mean time, you're welcome to use the code and modify it. I'm sure I'm not the first one to write something like this.

    (It's also useful to note which elements use onchange and which ones use onclick!)

    Attached Files Attached Files

  2. #2
    Silver Lounger
    Join Date
    Jan 2001
    Indianapolis, Indiana, USA
    Thanked 0 Times in 0 Posts

    Re: JavaScript getVal() function for form elements


    Thanks so much. That is really great info! That is a great function to use in a common .js file for any form-page.

    I'll do some testing with different versions of Netscape to see if I can come up with any differences. I'll post back if I find anything.

    Thanks again! <img src=/S/thankyou.gif border=0 alt=thankyou width=40 height=15>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts