| View previous topic :: View next topic |
| Author |
Message |
mel1
Joined: 17 Jun 2008 Posts: 6
|
Posted: Tue Jun 17, 2008 11:41 am Post subject: Form action help needed! |
|
|
Hi, I am wondering whether it is possible to have two onClick events for the one button in a form. I want to first "saysomething" (as in a message) and once the user clicks okay on the message I would like it to refresh the page.
My code is below but it does not work, can anyone help?
<form action="0">
<input type="button" value="Send Form"
onclick="saySomething('Your form has been sent. Thank-you for your input!')
onClick="window.location.reload()">
</form>
Any help appreciated. Mel |
|
| Back to top |
|
 |
|
|
rangana 500+ Club

Joined: 27 Feb 2008 Posts: 546 Location: Cebu City Philippines
|
Posted: Wed Jun 18, 2008 3:46 am Post subject: Re: Form action help needed! |
|
|
| Code: |
<input type="button" value="Send Form"
onclick="test=confirm('Your form has been sent. Thank-you for your input!'); if(test==true) window.location.reload();else alert('You press Cancel');">
|
|
|
| Back to top |
|
 |
mel1
Joined: 17 Jun 2008 Posts: 6
|
Posted: Wed Jun 18, 2008 7:37 am Post subject: Re: Form action help needed! |
|
|
| Thank you! |
|
| Back to top |
|
 |
rangana 500+ Club

Joined: 27 Feb 2008 Posts: 546 Location: Cebu City Philippines
|
Posted: Wed Jun 18, 2008 7:40 am Post subject: Re: Form action help needed! |
|
|
You're welcome  |
|
| Back to top |
|
 |
|