• JavaScript getVal() function for form elements

    Home » Forums » Developers, developers, developers » Web design and development » JavaScript getVal() function for form elements

    Author
    Topic
    #378379

    Attached is a zip file containing one HTML page with a demo of the JavaScript function getVal() that I referred to in post 190752 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!)

    Thanks!

    Viewing 0 reply threads
    Author
    Replies
    • #626100

      Charlie,

      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! thankyou

    Viewing 0 reply threads
    Reply To: JavaScript getVal() function for form elements

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: