Closed Thread
Results 1 to 5 of 5

Thread: javascript and forms

  1. #1
    Member agnieszka is an unknown quantity at this point
    Join Date
    Sep 2001
    Location
    newcastle, australia
    Posts
    65

    javascript and forms

    i was wondering if there was a way to have the submit button disabled until a textarea is written in?

    thanks.

  2. #2
    Junior Member Teddy7200 is an unknown quantity at this point
    Join Date
    Oct 2001
    Posts
    17

    Exclamation Sry

    their isnt unless somehow, you opt in javascript.
    Similar Catagories
    *Making Form Buttons Disabled After the user has clicked it

  3. #3
    Member agnieszka is an unknown quantity at this point
    Join Date
    Sep 2001
    Location
    newcastle, australia
    Posts
    65
    that's why i called the thread "javascript and forms"

  4. #4
    NLC Dusty is an unknown quantity at this point Dusty's Avatar
    Join Date
    Oct 2000
    Posts
    2,953
    Similar Catagories
    *Making Form Buttons Disabled After the user has clicked it
    Um, what? "Similar Catagories"? (Categories is spelled with an "e", by the way)

    Anyway, in your textarea tag add:

    onChange="document.formname.submitbutton.disabled=false"

    Changing "formname" to the name of your form and "submitbutton" as the name of your submit button. Example:

    <form name=formname>
    <textarea onChange="document.formname.submitbutton.disabled=false"></textarea>
    <input type=submit name=submitbutton disabled>
    </form>
    I think I may have been here before... a long, long time ago... 599699 Unread Posts, you say?

    Ah, I found my old avatar. The hypnotic evil duck.
    It was 2002. Duck avatars were the style at the time.
    Long and fascinating story there. I'd tell you if I remembered it.

  5. #5
    Member agnieszka is an unknown quantity at this point
    Join Date
    Sep 2001
    Location
    newcastle, australia
    Posts
    65
    thanks

Closed Thread

Bookmarks

Posting Permissions

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