Tasmanian Devil
05-16-2003, 11:55 AM
I was wondering if anyone could help me? I have a form that I want to use, I love the layout and all of the functions of it. But I need to know if there is a way to take the information that is put into the form by the user and when the submit butoon is pressed, it copies the information to another page so then the user can confirm the information and print the page and when the submit button pressed agian, then the form is submitted to me. Can anyone help?
<head>
<style type="text/css">
.pane {
display : none;
}
td.tabs {
border-top : light outset white;
border-left : light outset white;
}
div.tabs {
background-color : #ffffff;
cursor : hand;
}
</style>
<!-- following style not necessary -->
<style type="text/css">
body {
background-color : #ffffff;
}
input.txt {
position : absolute;
left : 120px;
}
input.chk {
position : relative;
}
</style>
<script type="text/javascript">
var currentPaneStyle = 0;
var currentTab = 0;
function tabstrip()
{
this.tabs = new Array();
this.add = addTab;
this.write = writeTabstrip;
}
function tab(caption,content)
{
this.setId = setId;
this.caption = caption;
this.content = content;
this.write = writeTab;
this.writeContent = writePane;
}
function addTab(tab)
{
tab.setId("tab" + this.tabs.length);
this.tabs[this.tabs.length] = tab;
}
function setId(id)
{
this.id = id;
}
function initiate()
{
var div = document.getElementById("tab0");
showPane(div);
}
function showPane(div)
{
if(currentTab != 0)
{
currentTab.style.backgroundColor = "#ffffff";
}
div.style.backgroundColor = "#ffffff";
currentTab = div;
if(currentPaneStyle != 0)
currentPaneStyle.display = "none";
var paneId = "pn_" + div.id;
var objPaneStyle = document.getElementById(paneId).style;
objPaneStyle.display = "block";
currentPaneStyle = objPaneStyle;
}
function SubmitForm()
{
tabform.submit();
}
function writePane()
{
document.write("<div class='pane' id='pn_" + this.id + "'>" + this.content + "</div>");
}
function writeTab()
{
document.write("<td class='tabs'><div class='tabs' id='" + this.id + "' onclick='showPane(this)'>" + this.caption + "</div></td>");
}
function writeTabstrip()
{
document.write("<table class='tabs'><tr>");
for(var i = 0; i < this.tabs.length; i++)
{
this.tabs[i].write();
}
document.write("</tr></table>");
for(var k = 0; k < this.tabs.length; k++)
{
this.tabs[k].writeContent();
}
initiate();
}
</script>
<script language="JavaScript">
function fmtPhoneno(fld) {
var str = fld.value.replace(/[^0-9]/g, "");
if (!/^[0-9]+$/.test(str)
|| (str.length != 10)) {
alert("Phone number must\r"+
"be numeric 10 digits.");
fld.focus;
return;
}
var x = (str.length<10) ? 0 : 3 ;
fld.value = (x==0) ? "" : "(" + str.substr(0,3) + ") " ;
fld.value+= str.substr(x,3) + "-" + str.substr(x+3);
}
function chkLimit(fld, nxt, evt) {
var myKey = (window.Event) ? evt.which : event.keyCode;
if (myKey < 47 || (myKey > 95 && myKey < 146)) return true;
// fld.value = fld.value.replace(/[^0-9]/g,""); // this messes up NS4
// fld.value = fld.value.substr(0,fld.size); // this messes up NS4
if (fld.value.length == fld.size) {
window.setTimeout("document."+nxt.form.name+"."+nxt.name+".focus()", 15);
}
return true;
}
function wrapLimit(fld, nxt, evt) {
var myKey = (window.Event) ? evt.which : event.keyCode;
if (myKey != 32 && (myKey < 47 || (myKey > 95 && myKey < 146)))
return true;
if (fld.value.length == fld.size) {
var str = fld.value;
var pos = str.lastIndexOf(" ");
if (pos!=(str.length-1) && pos!=(-1)) {
fld.value = str.substr(0,pos);
nxt.focus();
nxt.value = str.substr(pos+1);
} else {
window.setTimeout("document."+nxt.form.name+"."+nxt.name+".focus()", 15);
}
}
return true;
}
function fieldSizeForNS4() {
if (typeof document.layers == 'undefined') return true;
with (document.myForm) {
ph_area.size = 3;
ph_prefix.size = 3;
ph_suffix.size = 4;
T1.size = 30;
T2.size = 30;
T3.size = 30;
T4.size = 30;
T5.size = 30;
}
return true;
}
</script>
</head>
<body>
<script language="Javascript" src="fctrack.js">
</script>
<div align="center">
<pre><b><font size="+7" color="#000000" face="Times New Roman, Times, serif">Fox Valley Newspapers</font><font face="Comic Sans MS" size="+7" color="#000000">
<font face="Verdana, Arial, Helvetica, sans-serif" size="4" color="#FF0000">To Subscribe to the newspaper(s)
for your choice please fill out
the following form.</font></font></b></pre>
<p>Once all of the contact information is filled out, just click on the newspaper
choices </p>
<p>(put a check next to the paper and click when you would like to receive it if applicable, then
click the billing options</p>
</div>
<form name="tabform" method="post" action="cgi-t/form.cgi">
<p>
<script type="text/javascript">
var pane2 = "<table border=10><tr><td>Newspaper Choices:<br><input type='checkbox' name='Business Journal Paper' value='Subscribe Me'>Business Journal</input><br><input type='checkbox' name='Chicago Tribune Paper' value='Subscribe Me'>Chicago Tribune</input><br><input type='checkbox' name='New York Times Paper' value='Subscribe Me'>New York Times</input></td><td rowspan=2>Full Week:<br><input type='radio' name='Business Journal' value=Â’Full WeekÂ’>N/A</input><br><input type='radio' name='Chicago Tribune' value=' Full Week'>$6.00</input><br><input type='radio' name='New York Times' value=' Full Week'>$12.25</input><td <td rowspan=4>Monday - Saturday:<br><input type='radio' name='Business Journal' value='Monday - Saturday'>N/A</input><br><input type='radio' name='Chicago Tribune' value='Monday - Saturday '>$3.50</input><br><input type='radio' name='New York Times' value='Monday - Saturday '>$7.00</input><td rowspan=5>Friday Only:<br><input type='radio' name='Business Journal' value='Friday Only'>$2.50</input><br><input type='radio' name='Chicago Tribune' value='Friday Only '>N/A</input><br><input type='radio' name='New York Times' value='Friday Only '>N/A</input><td rowspan=7>Sunday Only:<br><input type='radio' name='Business Journal' value='Sunday Only'>N/A</input><br><input type='radio' name='Chicago Tribune' value='Sunday Only'>$2.50</input><br><input type='radio' name='New York Times' value='Sunday Only'>$5.50</input><td rowspan=8>Weekend Only:<br><input type='radio' name='Business Journal' value=' Sunday Only'>N/A</input><br><input type='radio' name='Chicago Tribune' value='Sunday Only'>$3.25</input><br><input type='radio' name='New York Times' value='Sunday Only'>$6.75</input></td></tr></table>";
var pane1 = "First Name: <input type='text' class='txt' name='First Name' size=20></input><br><br>Last Name: <input type='text' class='txt' name='Last Name' size=20></input><br><br>Address: <input type='text' class='txt' name='Address' size=20></input><br><br>Apartment: <input type='text' class='txt' name='Apartment' size=20></input><br><br>City: <input type='text' class='txt' name='City' size=20></input><br><br>State: <input type='text' class='txt' name='State' value='Wisconsin' onFocus='this.blur()' size=20></input><br><br>ZIP:<input type='text' class='txt' name='Zip'size=20></input><br><br>E-Mail:<input type='text' class='txt' name='E-Mail' size=20></input><br><br>Home Phone: <input type='text' class='txt' name='Work Phone' size=20 onChange=fmtPhoneno(this);></input><br><br>Work Phone: <input type='text' class='txt' name='Work Phone' size=20 onChange=fmtPhoneno(this);></input>";
var pane3 = "<table border=0><tr><td>Bill Me For:<br><input type='radio' name='Bill Me For' value='1 Month'>1 Month</input><br><input type='radio' name='Bill Me For' value='3 Months'>3 Months</input><br><input type='radio' name='Bill Me For' value='6 Months'>6 Months</input></td>";
var pane4 = "<table border=0><tr><td></td>";
var ts = new tabstrip();
var t1 = new tab("Contact Information",pane1);
var t2 = new tab("Newspaper Choices",pane2);
var t3 = new tab("Billing Options",pane3);
var t4 = new tab("",pane4);
ts.add(t1);
ts.add(t2);
ts.add(t3);
ts.add(t4);
ts.write();
</script>
<input type=hidden name="to" value=" subscribe@foxvalleynews.com">
<input type=hidden name="redirect" value="http://foxvalleynews.com/thank you for your subscription.html">
<input type=hidden name="subject" value="Milwaukee Area Subscription">
<input type=HIDDEN name=from value="subscribe@foxvalleynews.com">
<input type=hidden name="required" value="First Name,Last Name,Address,City,Zip,E-Mail,Bill Me For">
<input type=hidden name="print_blank_fields" value="1">
</p>
</form>
<button onclick="SubmitForm()">Subscribe Me Now</button>
<form name="form1" method="post" action="">
</form>
<p> </p>
<img src="http://www.foxvalleynews.com/cgi-t/counter?df=foxvalleynews.com.MilwaukeeArea&sh=0">
</body>
P.S. I do not have another page made up for the transfering of information, becasue I did not know if what I asked was possible.
Thanks
<head>
<style type="text/css">
.pane {
display : none;
}
td.tabs {
border-top : light outset white;
border-left : light outset white;
}
div.tabs {
background-color : #ffffff;
cursor : hand;
}
</style>
<!-- following style not necessary -->
<style type="text/css">
body {
background-color : #ffffff;
}
input.txt {
position : absolute;
left : 120px;
}
input.chk {
position : relative;
}
</style>
<script type="text/javascript">
var currentPaneStyle = 0;
var currentTab = 0;
function tabstrip()
{
this.tabs = new Array();
this.add = addTab;
this.write = writeTabstrip;
}
function tab(caption,content)
{
this.setId = setId;
this.caption = caption;
this.content = content;
this.write = writeTab;
this.writeContent = writePane;
}
function addTab(tab)
{
tab.setId("tab" + this.tabs.length);
this.tabs[this.tabs.length] = tab;
}
function setId(id)
{
this.id = id;
}
function initiate()
{
var div = document.getElementById("tab0");
showPane(div);
}
function showPane(div)
{
if(currentTab != 0)
{
currentTab.style.backgroundColor = "#ffffff";
}
div.style.backgroundColor = "#ffffff";
currentTab = div;
if(currentPaneStyle != 0)
currentPaneStyle.display = "none";
var paneId = "pn_" + div.id;
var objPaneStyle = document.getElementById(paneId).style;
objPaneStyle.display = "block";
currentPaneStyle = objPaneStyle;
}
function SubmitForm()
{
tabform.submit();
}
function writePane()
{
document.write("<div class='pane' id='pn_" + this.id + "'>" + this.content + "</div>");
}
function writeTab()
{
document.write("<td class='tabs'><div class='tabs' id='" + this.id + "' onclick='showPane(this)'>" + this.caption + "</div></td>");
}
function writeTabstrip()
{
document.write("<table class='tabs'><tr>");
for(var i = 0; i < this.tabs.length; i++)
{
this.tabs[i].write();
}
document.write("</tr></table>");
for(var k = 0; k < this.tabs.length; k++)
{
this.tabs[k].writeContent();
}
initiate();
}
</script>
<script language="JavaScript">
function fmtPhoneno(fld) {
var str = fld.value.replace(/[^0-9]/g, "");
if (!/^[0-9]+$/.test(str)
|| (str.length != 10)) {
alert("Phone number must\r"+
"be numeric 10 digits.");
fld.focus;
return;
}
var x = (str.length<10) ? 0 : 3 ;
fld.value = (x==0) ? "" : "(" + str.substr(0,3) + ") " ;
fld.value+= str.substr(x,3) + "-" + str.substr(x+3);
}
function chkLimit(fld, nxt, evt) {
var myKey = (window.Event) ? evt.which : event.keyCode;
if (myKey < 47 || (myKey > 95 && myKey < 146)) return true;
// fld.value = fld.value.replace(/[^0-9]/g,""); // this messes up NS4
// fld.value = fld.value.substr(0,fld.size); // this messes up NS4
if (fld.value.length == fld.size) {
window.setTimeout("document."+nxt.form.name+"."+nxt.name+".focus()", 15);
}
return true;
}
function wrapLimit(fld, nxt, evt) {
var myKey = (window.Event) ? evt.which : event.keyCode;
if (myKey != 32 && (myKey < 47 || (myKey > 95 && myKey < 146)))
return true;
if (fld.value.length == fld.size) {
var str = fld.value;
var pos = str.lastIndexOf(" ");
if (pos!=(str.length-1) && pos!=(-1)) {
fld.value = str.substr(0,pos);
nxt.focus();
nxt.value = str.substr(pos+1);
} else {
window.setTimeout("document."+nxt.form.name+"."+nxt.name+".focus()", 15);
}
}
return true;
}
function fieldSizeForNS4() {
if (typeof document.layers == 'undefined') return true;
with (document.myForm) {
ph_area.size = 3;
ph_prefix.size = 3;
ph_suffix.size = 4;
T1.size = 30;
T2.size = 30;
T3.size = 30;
T4.size = 30;
T5.size = 30;
}
return true;
}
</script>
</head>
<body>
<script language="Javascript" src="fctrack.js">
</script>
<div align="center">
<pre><b><font size="+7" color="#000000" face="Times New Roman, Times, serif">Fox Valley Newspapers</font><font face="Comic Sans MS" size="+7" color="#000000">
<font face="Verdana, Arial, Helvetica, sans-serif" size="4" color="#FF0000">To Subscribe to the newspaper(s)
for your choice please fill out
the following form.</font></font></b></pre>
<p>Once all of the contact information is filled out, just click on the newspaper
choices </p>
<p>(put a check next to the paper and click when you would like to receive it if applicable, then
click the billing options</p>
</div>
<form name="tabform" method="post" action="cgi-t/form.cgi">
<p>
<script type="text/javascript">
var pane2 = "<table border=10><tr><td>Newspaper Choices:<br><input type='checkbox' name='Business Journal Paper' value='Subscribe Me'>Business Journal</input><br><input type='checkbox' name='Chicago Tribune Paper' value='Subscribe Me'>Chicago Tribune</input><br><input type='checkbox' name='New York Times Paper' value='Subscribe Me'>New York Times</input></td><td rowspan=2>Full Week:<br><input type='radio' name='Business Journal' value=Â’Full WeekÂ’>N/A</input><br><input type='radio' name='Chicago Tribune' value=' Full Week'>$6.00</input><br><input type='radio' name='New York Times' value=' Full Week'>$12.25</input><td <td rowspan=4>Monday - Saturday:<br><input type='radio' name='Business Journal' value='Monday - Saturday'>N/A</input><br><input type='radio' name='Chicago Tribune' value='Monday - Saturday '>$3.50</input><br><input type='radio' name='New York Times' value='Monday - Saturday '>$7.00</input><td rowspan=5>Friday Only:<br><input type='radio' name='Business Journal' value='Friday Only'>$2.50</input><br><input type='radio' name='Chicago Tribune' value='Friday Only '>N/A</input><br><input type='radio' name='New York Times' value='Friday Only '>N/A</input><td rowspan=7>Sunday Only:<br><input type='radio' name='Business Journal' value='Sunday Only'>N/A</input><br><input type='radio' name='Chicago Tribune' value='Sunday Only'>$2.50</input><br><input type='radio' name='New York Times' value='Sunday Only'>$5.50</input><td rowspan=8>Weekend Only:<br><input type='radio' name='Business Journal' value=' Sunday Only'>N/A</input><br><input type='radio' name='Chicago Tribune' value='Sunday Only'>$3.25</input><br><input type='radio' name='New York Times' value='Sunday Only'>$6.75</input></td></tr></table>";
var pane1 = "First Name: <input type='text' class='txt' name='First Name' size=20></input><br><br>Last Name: <input type='text' class='txt' name='Last Name' size=20></input><br><br>Address: <input type='text' class='txt' name='Address' size=20></input><br><br>Apartment: <input type='text' class='txt' name='Apartment' size=20></input><br><br>City: <input type='text' class='txt' name='City' size=20></input><br><br>State: <input type='text' class='txt' name='State' value='Wisconsin' onFocus='this.blur()' size=20></input><br><br>ZIP:<input type='text' class='txt' name='Zip'size=20></input><br><br>E-Mail:<input type='text' class='txt' name='E-Mail' size=20></input><br><br>Home Phone: <input type='text' class='txt' name='Work Phone' size=20 onChange=fmtPhoneno(this);></input><br><br>Work Phone: <input type='text' class='txt' name='Work Phone' size=20 onChange=fmtPhoneno(this);></input>";
var pane3 = "<table border=0><tr><td>Bill Me For:<br><input type='radio' name='Bill Me For' value='1 Month'>1 Month</input><br><input type='radio' name='Bill Me For' value='3 Months'>3 Months</input><br><input type='radio' name='Bill Me For' value='6 Months'>6 Months</input></td>";
var pane4 = "<table border=0><tr><td></td>";
var ts = new tabstrip();
var t1 = new tab("Contact Information",pane1);
var t2 = new tab("Newspaper Choices",pane2);
var t3 = new tab("Billing Options",pane3);
var t4 = new tab("",pane4);
ts.add(t1);
ts.add(t2);
ts.add(t3);
ts.add(t4);
ts.write();
</script>
<input type=hidden name="to" value=" subscribe@foxvalleynews.com">
<input type=hidden name="redirect" value="http://foxvalleynews.com/thank you for your subscription.html">
<input type=hidden name="subject" value="Milwaukee Area Subscription">
<input type=HIDDEN name=from value="subscribe@foxvalleynews.com">
<input type=hidden name="required" value="First Name,Last Name,Address,City,Zip,E-Mail,Bill Me For">
<input type=hidden name="print_blank_fields" value="1">
</p>
</form>
<button onclick="SubmitForm()">Subscribe Me Now</button>
<form name="form1" method="post" action="">
</form>
<p> </p>
<img src="http://www.foxvalleynews.com/cgi-t/counter?df=foxvalleynews.com.MilwaukeeArea&sh=0">
</body>
P.S. I do not have another page made up for the transfering of information, becasue I did not know if what I asked was possible.
Thanks