confirm box
Hello,
Is there a way with a confirm box to display selections the user just entered on the form. For example, I would like to use the confirm box to say something like, "You entered xxx and yyy, is this what you really want? Click OK to continue or Cancel to try again", where xxx and yyy are selections the user made on the form. Thanks in advance!
Bob
detox posted this at 02:01 — 7th May 2001.
They have: 571 posts
Joined: Feb 2001
This should work:
<script LANGUAGE="JavaScript">
function doit(){
alert ("This is what you entered:\n" +
document.formu.name.value + "\n" + document.formu.mail.value +"\n" +
document.formu.products.value +"\nis this information correct?")
</script>
<form NAME="formu" action="yoursubmissionpage.htm">
<p>Name: <input TYPE="text" NAME="name" SIZE="40" MAXLENGTH="40"
> </p>
<p>E-mail : <input TYPE="text" NAME="mail" SIZE="30" MAXLENGTH="40"> </p>
<p>Choice: <select NAME="products" size="1">
<option VALUE="Basic product "> Basic </option>
<option VALUE="product K50"> product K50 </option>
<option VALUE="product ISDN"> product ISDN </option>
</select> </p>
<p><input TYPE="checkbox" NAME="genre" VALUE="yada">yada<br>
<input TYPE="checkbox" NAME="genre" VALUE="yadayada"> yadayada<br>
</p>
<p><input TYPE="submit" VALUE="envoyer" onclick="doit()"> </p>
</form>
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.