HTML Confirmation Box?

  • Thread starter Thread starter iisjman07
  • Start date Start date
I

iisjman07

Guest
I'm currently doing my GCSE IT shizzle about web pages. Right now I am making a feedback form for visitors and I don't know what to do next. I've made my form with all the tick boxes, radio buttons and text entry fields but after you click the Submit link I want a confirmation box to popup asking something like 'Please confirm the entered information is correct'. Anyone help?
 
If you are using just HTML, the only way to go is the Javascript OK/Cancel prompt solution or an OnSubmit routine (which at the same time can validate the form data).

The other answer which suggests displaying a preview page for the user to confirm is tedious for the user and not user-friendly, not unless you plan to use AJAX.
 
You should use JavaScript (in the html file) for this.

<script language="javascript">
function myMethod(){
var cnf= confirm("Please confirm the entered information is correct");
if(cnf){
Something here if confirmed.
}
}
</script>

Simply add the above code to html file. And then use "onclick" event on any html object

Eg:

<input type="button" onclick="myMethod()">
 
Back
Top