Forms, submiting confirmation pop up.

J

j.t.

I am freelancing and setting this form up for this restaurant, and am
giving the option of a pull down menu to order a selected meal and
then given the option with a textarea to make changes to an order if
necessary. the problem i am running into is that I want to have the
information displayed in another form or pop up to make sure the order
is complete and accurate before submiting. the problem i run into is
submited the order when I have it displayed in the pop up. I was
thinking 'Printscreen' or to somehow transfer the info from the
original <input> boxes to the new pop up screen. Neither one has
worked. I am pretty much doing this for the experience and not the
pennys that I will be receiving. any help would be appreciated.

here is the coding sofar.


<HTML>
<HEAD>
<TITLE>Restaurant Order
</TITLE>

<script>
<!--
self.status = "Welcome to my Restaurant!"
//-->
function copyText(thesel) {
if (!document.all) return; // IE only
theForm = thesel.form;
theForm.copyArea.value=thesel.options[thesel.selectedIndex].value;
r=theForm.copyArea.createTextRange();
r.select();
r.execCommand('copy');
}
</script>

<script language=javascript>
function autotab(max, field) {
if (!/^\d+$/.test(field.value)) { //digits only
field.value = '';
return false;
}
if (field.value.length<max) return true; //still room
var el, e = 0, f = field.form;
while (el = f.elements[e++]) if (el == field) break; //find field
position
f.elements[e].focus(); //move focus
return false;
}
function PopIt(label, msg)
{
var Title =
"<TITLE>Your Order confirmation</TITLE>" +
"<BODY BGCOLOR='ffffff'><TABLE BORDER=0><TR>" +
"<TD WIDTH=90% HEIGHT=90 VALIGN=TOP ALIGN=LEFT>"
var Output =
"<b>Your

name:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb

sp;&nbsp;</b>&nbsp;&nbsp;" +
document.frmInput.txtname.value +
"<br>"

+"<b>MTN:</b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&

nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"
+
document.frmInput.MTN1.value + "-" +
document.frmInput.MTN2.value + "-" +
document.frmInput.MTN3.value +
"<br>" +
"<b>Carry-out / Dine-In:</b>&nbsp;&nbsp;&nbsp;&nbsp;" +
document.frmInput.txtDining.value +
"<P><hr>" +
"<b>Meal:</b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&

nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"
+
document.frmInput.copyArea.value +
"<br>" +

"<b>Meal preferences:</b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" +
document.frmInput.preferences1.value +
"<br>"
var s3 =
"</TD><TD WIDTH=15%> </TD></TR><TR><TD> </TD>"+
"<TD VALIGN=TOP ALIGN=Left>"+
"<INPUT TYPE='BUTTON' VALUE='Okay'" +
"onClick='self.close()'>" +
"</TD></TR></TABLE></BODY>"
popup = window.open("","popDialog","height=250,width=800,scrollbars=yes");
popup.document.write(Title+Output+s3);
popup.moveTo(0,0)
popup.document.close()
}
</script>
</HEAD>





<!-- ***********************************************************************
//-->

<BODY text="white">
<FORM NAME=frmInput Method=post Enctype=text/plain>

<font size="3" color="#0000ff"><b>&nbsp;&nbsp;&nbsp;Please input your
name, and 10-digit

telephone number.</b></font>

<table border="1" cellpadding="3" cellspacing="0">
<tr valign="top">
<td width="150" bgcolor="blue">
<h4>&nbsp;Name:
</td>
<td>
&nbsp;<Input type=text name=txtname size=31 maxlenght="50"></h4>
</td>
</tr>

<tr valign="top">
<td width="150" bgcolor="blue">
<h4>&nbsp;MTN:</h4>
</td>
<td align="left">
&nbsp;<input type=text name="MTN1" maxlength=3 size=3 onkeyup="return
autotab(3, this)">
<input type=text name="MTN2" maxlength=3 size=3 onkeyup="return
autotab(3, this)">
<input type=text name="MTN3" maxlength=4 size=4 onkeyup="return
autotab(4, this)">
</td>
</tr>


<tr valign="top">
<td width="150" bgcolor="blue">
<h4 align=left>&nbsp;Carry-out / Dine-In:</h4>
</td>
<td>
&nbsp;<input type=radio name="Dining" value="Carry out"

onClick="document.frmInput.txtDining.value ='Carry-out'"><font

color="black">Carry-out</font><br>
&nbsp;<input type=radio name="Dining" value="Dine In"

onClick="document.frmInput.txtDining.value ='Dine-In'"><font

color="black">Dine-In</font><br>
<input type=hidden name="txtDining">
<p>
</td>
</tr>


<tr valign="top">
<td width="150" bgcolor="blue">
<font size="3"><b>&nbsp;Meals: </b></font>
</td>
<td>
&nbsp;<select onChange="copyText(this)">
<option value="">Please select
<Option Value=Pizza>Pizza</Option>
<Option Value=Spaghetti>Spaghetti</Option>
<Option Value=Steak>Steak</Option>
<Option Value=Baby back ribs>Baby back ribs</Option>
<Option Value=Salad>Salad</Option>
<Option Value=Chocoloate>Chocoloate</Option>
<Option Value=Hot dogs>Hot dogs</Option>
<Option Value=Plain ol dressing>Plain ol' dressing</Option>
<Option Value=Mac & Cheese>Mac & cheese</Option>
<Option Value=Escargo>Escargo</Option>
</Select>
<input type=hidden name="copyArea" value="" size=31>
</td>
</tr>

<tr valign="top">
<td width="150" bgcolor="blue">
<font size="3"><b>&nbsp;Meal preferences: </b></font>
</td>
<td>
&nbsp;<TextArea name="preferences1" Rows=6 cols=23 WRAP>
</Textarea>
<Br>
</td>
</tr>


<tr valign="top">
<td width="400" height="40" valign="center" colspan="2" align="middle"
bgcolor="blue">
<input type=submit name=cmdSubmit Value="Submit Order"
onClick="PopIt();">
&nbsp;&nbsp;&nbsp;
<input name=cmdReset Type=reset Value="Clear Entries">
</td>
</tr>
</table>
</form>

</body>
</htmL>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,901
Latest member
Noble71S45

Latest Threads

Top