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
  1. #1
    New to the CF scene
    Join Date
    Feb 2003
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Reset form through Javascript

    I am trying to add a custom reset button to my form. How do i reset the form through javascript.

    TIA

    Eddie

  • #2
    Supreme Master coder! Philip M's Avatar
    Join Date
    Jun 2002
    Location
    London, England
    Posts
    18,079
    Thanks
    203
    Thanked 2,542 Times in 2,520 Posts
    <input type="reset" value="Reset The Form" onClick="willReset=confirm('Are you sure you want to clear all your entries? ');return willReset;">

  • #3
    New to the CF scene
    Join Date
    Feb 2003
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks but that is not quite what i was looking for. I am trying to use a input type="image". I want that image to have an on click event that resets the form.

  • #4
    Supreme Master coder! Philip M's Avatar
    Join Date
    Jun 2002
    Location
    London, England
    Posts
    18,079
    Thanks
    203
    Thanked 2,542 Times in 2,520 Posts
    <a href="javascript:document.formname.reset()">
    <img src="resettheform.jpg" Width="100" Height="20" Alt=""></a>

  • #5
    New to the CF scene
    Join Date
    Feb 2003
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks


  •  

    Posting Permissions

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