This is a discussion on "Submit Button Confirmation" within the Web Page Design section. This forum, and the thread "Submit Button Confirmation are both part of the Design Your Website category.
|
|
|
|
|
![]() |
||
Submit Button Confirmation
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
|||
|
Submit Button Confirmation
Just wondering if anyone would know how to add a confirmation to a submit button on a html page the form is being submit to a php page just want to be able to confirm that the info being submitted is correct before submitting.
if any one could assist it would be appreciated. Brian |
|
|
|
||||
|
Re: Submit Button Confirmation
the simple client-side solution is...
<form onsubmit="return window.confirm('Are you sure?');"... OR... <input type="submit" value="Submit" onsubmit="return window.confirm('Are you sure?');"...
Last Blog Entry: Random String in Javascript (Apr 21st, 2008)
|
|
||||
|
Re: Submit Button Confirmation
I wouldn't do that with JS!
|
|
||||
|
Re: Submit Button Confirmation
Ok, Brian wasn't very clear whether he wanted to 1) 'ask the visitor if he realy wants to submit the form' or if he wants to 2) 'validate the data on the form before submitting it'.
In my previous post I answered 1). 2) If this is what you want, then... assuming that you want to perform some type of validation before the form is submitted, you will need to use javascript. This would by no means replace serve-side validation and you should still validate every bit of data on the server. and if this is the case, then you need to tell us what you want to validate...
Last Blog Entry: Random String in Javascript (Apr 21st, 2008)
|
|
||||
|
Re: Submit Button Confirmation
Either way ... I would use a server-side language to perform the task. In the off-chance that JS is disabled.
|
|
||||
|
Re: Submit Button Confirmation
That's what I said...
Server-side validation is a must have always ever in any scenario for ever and ever! But javascript validation helps reduce the load on your server...
Last Blog Entry: Random String in Javascript (Apr 21st, 2008)
|
![]() |
| Tags |
| submit button |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Submit button problems | lucyhjones | Starting Out | 4 | Sep 6th, 2007 18:22 |
| Does a submit button have to be in the form itself | Sylvester | Web Page Design | 1 | Apr 17th, 2007 12:14 |
| submit button changes when clicked | troublesomegirl | JavaScript Forum | 0 | Feb 18th, 2007 01:10 |
| Form Submit button Help!!! | Aaron1988 | Web Page Design | 2 | Nov 25th, 2006 13:51 |