Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Javascript confirm reset button
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Topic ClosedJavascript confirm reset button

 Post Reply Post Reply
Author
KCWebMonkey View Drop Down
Senior Member
Senior Member
Avatar
Go Chiefs!

Joined: 21 June 2002
Status: Offline
Points: 1319
Direct Link To This Post Topic: Javascript confirm reset button
    Posted: 15 September 2003 at 9:10pm

In my form, i want the reset button to bring up a confirm box that confirms they want to clear the form.

It needs to clear the form if they click ok, and do nothing if they click cancel.

I had the code for this before, but lost it

How do i get this done?

Back to Top
Diep-Vriezer View Drop Down
Senior Member
Senior Member
Avatar

Joined: 06 August 2003
Location: Netherlands
Status: Offline
Points: 831
Direct Link To This Post Posted: 16 September 2003 at 9:15am

 

Gone..
Back to Top
KCWebMonkey View Drop Down
Senior Member
Senior Member
Avatar
Go Chiefs!

Joined: 21 June 2002
Status: Offline
Points: 1319
Direct Link To This Post Posted: 16 September 2003 at 10:07am

umm... i may need a little more input than that

would i do it with something like this?

<script>
function clearConfirm() {
  If confirm('Are you sure?');
    return true;
  else
    return false;
}
</script>

<input type="reset" onClick="clearConfirm()">

I know this doesn't work, but is it going to be similar to this?



Edited by KCWebMonkey
Back to Top
Flamewave View Drop Down
Senior Member
Senior Member
Avatar

Joined: 19 June 2002
Location: United States
Status: Offline
Points: 376
Direct Link To This Post Posted: 16 September 2003 at 11:59am
<input type="reset" onClick="return confirm('Are you sure?');">
- Flamewave

They say the grass is greener on the other side, but if you really think about it, the grass is greener on both sides.
Back to Top
KCWebMonkey View Drop Down
Senior Member
Senior Member
Avatar
Go Chiefs!

Joined: 21 June 2002
Status: Offline
Points: 1319
Direct Link To This Post Posted: 16 September 2003 at 12:30pm
Thanks. I had tried that earlier, but i guess i did it wrong...
Back to Top
Diep-Vriezer View Drop Down
Senior Member
Senior Member
Avatar

Joined: 06 August 2003
Location: Netherlands
Status: Offline
Points: 831
Direct Link To This Post Posted: 16 September 2003 at 1:45pm
Lol I posted blank. Flamewave posted what I wanted to do..
Gone..
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.