Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5

Thread: reset a form

  1. #1
    New Coder
    Join Date
    Jan 2003
    Location
    N. Ireland
    Posts
    79
    Thanks
    0
    Thanked 0 Times in 0 Posts

    reset a form

    i want to reset the radio buttons on a form to unchecked after it is submitted, i used a JS function to do this on the form text boxes but when i try the radio buttons i get an error, any ideas on how nto do this..
    ska

  • #2
    raf
    raf is offline
    Master Coder
    Join Date
    Jul 2002
    Posts
    6,589
    Thanks
    0
    Thanked 0 Times in 0 Posts
    can't you reload the page ?

    maybe create a multi-purpose page and set a flag when you submit + display values ad cheched buttons depending on this flag

  • #3
    Senior Coder
    Join Date
    Jun 2002
    Location
    41° 8' 52" N -95° 53' 31" W
    Posts
    3,660
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Can you post an example of your code? You have to loop through radio buttons to uncheck them...
    Former ASP Forum Moderator - I'm back!

    If you can teach yourself how to learn, you can learn anything. ;)

  • #4
    Rockstar Coder
    Join Date
    Jun 2002
    Location
    USA
    Posts
    9,074
    Thanks
    1
    Thanked 328 Times in 324 Posts
    Javascript isn't one of my strong points but couldn't you just call the form.reset() method upon submit? That would reset the form.

    Or call the reset button on the page.
    OracleGuy

  • #5
    New Coder
    Join Date
    Jan 2003
    Location
    N. Ireland
    Posts
    79
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Ive relegated this to 'things to do in the future' list, i will going through my javascript book again to see how to to refer to radio buttons, i think that might be where im going wrong, a quick look at the book tells me that im not doing this right and a recent post about JS IF/ ELSE...TRUE/FASLE statements aqlso shows where i could be getting an error.....I'LL get back to this one again
    ska


  •  

    Posting Permissions

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