navigation
a webmaster learning community
     Home    Register     Search      Help      Login    
FrontPage Alternative
Sponsors

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Free FrontPage Templates

Search Forums
 

Advanced search
Recent Posts

 Todays Posts
 Most Active posts
 Posts since last visit
 My Recent Posts
 Mark posts read

 

Passover Information

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> ASP and Database >> Passover Information
Page: [1]
 
styrochem

 

Posts: 212
Joined: 5/11/2004
Status: offline

 
Passover Information - 8/26/2004 8:50:38   
What do I need to do to make this form pass the field information to another form? Here is the code.

<html>

<head>
<meta http-equiv="Content-Language" content="en-us">
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>STYROCHEM</title>
<style>
<!--
h1
	{margin-top:12.0pt;
	margin-right:0in;
	margin-bottom:3.0pt;
	margin-left:0in;
	page-break-after:avoid;
	font-size:16.0pt;
	font-family:Arial;
	}
-->
</style>
</head>

<body>

<form method="GET" action="../formmail_ReceiversReport.asp">
  <h1 align="center" style="text-align: center">
  <font color="#99CCFF"><span style="font-family: Verdana">STYROCHEM</span></font></h1>
  <h1 align="center" style="text-align: center"><font color="#99CCFF">New  
  Vendor Sheet</font></h1>
  <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="92%" id="AutoNumber1" height="335">
    <tr>
      <td width="50%" height="22" colspan="2"><b>Vendor Name:    
      </b></td>
      <td width="72%" height="22" colspan="2">
      <input type="text" name="VendorName" size="36"></td>
    </tr>
    <tr>
      <td width="50%" height="22" colspan="2"><b>Vendor Address: </b></td>
      <td width="72%" height="22" colspan="2">
      <input type="text" name="VendorAddress" size="36"></td>
    </tr>
    <tr>
      <td width="50%" height="22" colspan="2"><b>City:   </b>                
      </td>
      <td width="72%" height="22" colspan="2">
      <input type="text" name="VendorCity" size="20"></td>
    </tr>
    <tr>
      <td width="50%" height="22" colspan="2"><b>State/Providence: </b></td>
      <td width="72%" height="22" colspan="2">
      <select size="1" name="VendorState">
      <option selected>Please select state or province</option>
      <option value="AL">ALABAMA</option>
      <option value="AK">ALASKA</option>
      <option value="AS">AMERICAN SAMOA</option>
      <option value="AZ">ARIZONA</option>
      <option value="AR">ARKANSAS</option>
      <option value="CA">CALIFORNIA</option>
      <option value="CO">COLORADO</option>
      <option value="CT">CONNECTICUT</option>
      <option value="DE">DELAWARE</option>
      <option value="DC">DISTRICT OF COLUMBIA</option>
      <option value="FM">FEDERATED STATES OF MICRONESIA</option>
      <option value="FL">FLORIDA</option>
      <option value="GA">GEORGIA</option>
      <option value="GU">GUAM</option>
      <option value="HI">HAWAII</option>
      <option value="ID">IDAHO</option>
      <option value="IL">ILLINOIS</option>
      <option value="IN">INDIANA</option>
      <option value="IA">IOWA</option>
      <option value="KS">KANSAS</option>
      <option value="KY">KENTUCKY</option>
      <option value="LA">LOUISIANA</option>
      <option value="ME">MAINE</option>
      <option value="MH">MARSHALL ISLANDS</option>
      <option value="MD">MARYLAND</option>
      <option value="MA">MASSACHUSETTS</option>
      <option value="MI">MICHIGAN</option>
      <option value="MN">MINNESOTA</option>
      <option value="MS">MISSISSIPPI</option>
      <option value="MO">MISSOURI</option>
      <option value="MT">MONTANA</option>
      <option value="NE">NEBRASKA</option>
      <option value="NV">NEVADA</option>
      <option value="NH">NEW HAMPSHIRE</option>
      <option value="NJ">NEW JERSEY</option>
      <option value="NM">NEW MEXICO</option>
      <option value="NY">NEW YORK</option>
      <option value="NC">NORTH CAROLINA</option>
      <option value="ND">NORTH DAKOTA</option>
      <option value="MP">NORTHERN MARIANA ISLANDS</option>
      <option value="OH">OHIO</option>
      <option value="OK">OKLAHOMA</option>
      <option value="OR">OREGON</option>
      <option value="PW">PALAU</option>
      <option value="PA">PENNSYLVANIA</option>
      <option value="PR">PUERTO RICO</option>
      <option value="RI">RHODE ISLAND</option>
      <option value="SC">SOUTH CAROLINA</option>
      <option value="SD">SOUTH DAKOTA</option>
      <option value="TN">TENNESSEE</option>
      <option value="TX">TEXAS</option>
      <option value="UT">UTAH</option>
      <option value="VT">VERMONT</option>
      <option value="VI">VIRGIN ISLANDS</option>
      <option value="VA">VIRGINIA</option>
      <option value="WA">WASHINGTON</option>
      <option value="WV">WEST VIRGINIA</option>
      <option value="WI">WISCONSIN</option>
      <option value="WY">WYOMING</option>
      <option value="AB">CANADA - ALBERTA</option>
      <option value="BC">CANADA - BRITISH COLUMBIA</option>
      <option value="MB">CANADA - MANITOBA</option>
      <option value="NB">CANADA - NEW BRUNSWICK</option>
      <option value="NL">CANADA - NEWFOUNDLAND AND LABRADOR</option>
      <option value="NT">CANADA - NORTHWEST TERRITORIES</option>
      <option value="NS">CANADA - NOVA SCOTIA</option>
      <option value="NU">CANADA - NUNAVUT</option>
      <option value="ON">CANADA - ONTARIO</option>
      <option value="PE">CANADA - PRINCE EDWARD ISLAND</option>
      <option value="QC">CANADA - QUEBEC</option>
      <option value="SK">CANADA - SASKATCHEWAN</option>
      <option value="YT">CANADA - YUKON</option>
      </select></td>
    </tr>
    <tr>
      <td width="33%" height="22">
      <p align="left"><b>Zip:  </b></td>
      <td width="26%" height="22">
      <input type="text" name="VendorZip" size="10"></td>
      <td width="23%" height="22">
      <p align="left"><b>Country: </b></td>
      <td width="43%" height="22">
      <select size="1" name="VendorCountry">
      <option selected>Please select country</option>
      <option>United States</option>
      <option>Canada</option>
      <option>China</option>
      <option>France</option>
      <option>Korea</option>
      </select></td>
    </tr>
    <tr>
      <td width="33%" height="1">
      <p align="left"><b>Telephone Number:  </b></td>
      <td width="26%" height="1">
      <input type="text" name="VendorPhone" size="10"></td>
      <td width="23%" align="center" height="1">
      <p align="left"><b>Fax Number: </b></td>
      <td width="43%" height="1"><input type="text" name="VendorFax" size="10"></td>
    </tr>
    <tr>
      <td width="47%" height="23" colspan="2">
      <p align="left"><b>Vendor Category: </b></td>
      <td width="55%" height="23" colspan="2">
      <p align="left"><nobr>
      
<% if 0 then %>
<SCRIPT Language="JavaScript">
document.write("<div style='background: yellow; color: black;'>The Database Results component on this page is unable to display database content. The page must have a filename ending in '.asp', and the web must be hosted on a server that supports Active Server Pages.</div>");
      </SCRIPT>
<% end if %>
<%
fp_sQry="SELECT * FROM tblVendor_Categories_PO"
fp_sDefault=""
fp_sNoRecords="No records returned."
fp_sDataConn="Purchase_Orders"
fp_iMaxRecords=256
fp_iCommandType=1
fp_iPageSize=0
fp_fTableFormat=False
fp_fMenuFormat=True
fp_sMenuChoice="VendorCategory"
fp_sMenuValue="VendorCategory"
fp_sColTypes="&VendorCategory=202&"
fp_iDisplayCols=1
fp_fCustomQuery=False
BOTID=0
fp_iRegion=BOTID
%>
      
      </nobr></td>
    </tr>
    <tr>
      <td width="47%" height="52" colspan="2"><b>Summary of materials supplied 
      by vendor: </b></td>
      <td width="55%" height="52" colspan="2">
      <textarea rows="2" name="VendorSummaryofMaterials" cols="30"></textarea></td>
    </tr>
    <tr>
      <td width="47%" height="22" colspan="2"><b>Vendor Contact:  </b></td>
      <td width="55%" height="22" colspan="2">
      <input type="text" name="VendorContact" size="20"></td>
    </tr>
    <tr>
      <td width="47%" height="22" colspan="2"><b>Email address:    
      </b></td>
      <td width="55%" height="22" colspan="2">
      <input type="text" name="VendorEmailAddress" size="20"></td>
    </tr>
    <tr>
      <td width="47%" height="22" colspan="2"><b>Web Address:</b> </td>
      <td width="55%" height="22" colspan="2">
      <input type="text" name="VendorWebAddress" size="37"></td>
    </tr>
    <tr>
      <td width="47%" height="38" colspan="2"><b>Does this vendor accept orders 
      via the web?:</b> </td>
      <td width="55%" height="38" colspan="2">
      <input type="radio" value="Yes" name="VendorAcceptsWebOrders">YES  
      <input type="radio" name="VendorAcceptsWebOrders" value="No3">NO  </td>
    </tr>
    <tr>
      <td width="100%" height="21" colspan="4"><b>Taxable:</b>            
      <input type="radio" name="VendorTaxable" value="YES">YES  
      <input type="radio" name="VendorAcceptsWebOrders" value="NO2">NO </td>
    </tr>
    <tr>
      <td width="100%" height="21" colspan="4"><b>1099 Vendor:</b>     <input type="radio" name="Vendor1099" value="YES">YES  
      <input type="radio" name="Vendor1099" value="NO">NO  
      <input type="radio" name="Vendor1099" value="Not Sure">NOT SURE</td>
    </tr>
  </table>
  <p align="center"><input type="submit" value="Send Form"><input type="reset" value="Reset"></p>
  <input type="hidden" name="VendorNumber" value="PENDING">
  <input type="hidden" name="recipient" value="jgreer@styrochem.com">
  <input type="hidden" name="redirect" value="http://intranet.styrochem.com">
  <input type="hidden" name="subject" value="New Vendor Request">
</form>

</body>

</html>
Spooky

 

Posts: 26606
Joined: 11/11/1998
From: Middle Earth
Status: offline

 
RE: Passover Information - 8/26/2004 17:40:35   
In the second page - you will use :

<%=Request.Form("FieldName")%>

This is the "value" of each text box, so when you submit from from 1 to form 2, the value will be inserted in form 2. "FieldName" is the name of each "input" in form 1.

_____________________________

If you arent part of the solution, then there is good money to be made prolonging the problem

§þ:)


(in reply to styrochem)
styrochem

 

Posts: 212
Joined: 5/11/2004
Status: offline

 
RE: Passover Information - 8/27/2004 13:34:19   
Do I need to add anything to the originating page? Form 1?

(in reply to Spooky)
styrochem

 

Posts: 212
Joined: 5/11/2004
Status: offline

 
RE: Passover Information - 8/27/2004 14:44:16   
I configured those second form with that information and its remaining blank. No field entries are being carried over from form 1 to form 2. Do I need to make some changes to the originating form so that it knows to forward that info on?

(in reply to styrochem)
BeTheBall

 

Posts: 6381
Joined: 6/21/2002
From: West Point Utah USA
Status: offline

 
RE: Passover Information - 8/27/2004 15:38:15   
quote:

Do I need to make some changes to the originating form so that it knows to forward that info on?


Shouldn't need to. As long as Form1 submits to the page whereon sits Form2, then the Request.Form variables should be available. Have you given the page you are submitting to a .asp extension? If you just want to make sure the variables are indeed carried over, go to the page to which form1 submits and insert this bit of code:

<%=Request.Form("FormFieldName")%>

When you submit the form, the value that was entered for the form field you choose in the code above should be displayed on the page.

_____________________________

Duane

Some people are like Slinkies . . . Not really good for anything . . . . . But they still bring a smile to your face when you push them down a flight of stairs.

(in reply to styrochem)
ou812

 

Posts: 1603
Joined: 1/5/2002
From: San Diego
Status: offline

 
RE: Passover Information - 8/27/2004 21:20:03   
If you change your method="GET" to method="POST" of form1 and follow Spooky's advice you should be okay.

-brian

(in reply to BeTheBall)
styrochem

 

Posts: 212
Joined: 5/11/2004
Status: offline

 
RE: Passover Information - 8/30/2004 7:24:43   
Still not working. The first page sends the info to the database and then when it goes to the second there is no info carried over.

Here is the page code.


Form 1

<%
' FP_ASP ASP Automatically generated by a Frontpage Component. Do not Edit.

On Error Resume Next
Session("FP_OldCodePage") = Session.CodePage
Session("FP_OldLCID") = Session.LCID
Session.CodePage = 1252
Session.LCID = 1033
Err.Clear

strErrorUrl = ""

If Request.ServerVariables("REQUEST_METHOD") = "POST" Then
If Request.Form("VTI-GROUP") = "0" Then
	Err.Clear

	Set fp_conn =  Server.CreateObject("ADODB.Connection")
	FP_DumpError strErrorUrl, "Cannot create connection"

	Set fp_rs = Server.CreateObject("ADODB.Recordset")
	FP_DumpError strErrorUrl, "Cannot create record set"

	fp_conn.Open Application("Purchase_Orders_ConnectionString")
	FP_DumpError strErrorUrl, "Cannot open database"

	fp_rs.Open "tblVendors_PO", fp_conn, 1, 3, 2 ' adOpenKeySet, adLockOptimistic, adCmdTable
	FP_DumpError strErrorUrl, "Cannot open record set"

	fp_rs.AddNew
	FP_DumpError strErrorUrl, "Cannot add new record set to the database"
	Dim arFormFields0(15)
	Dim arFormDBFields0(15)
	Dim arFormValues0(15)

	arFormFields0(0) = "VendorAddress"
	arFormDBFields0(0) = "VendorAddress"
	arFormValues0(0) = Request("VendorAddress")
	arFormFields0(1) = "VendorCountry"
	arFormDBFields0(1) = "VendorCountry"
	arFormValues0(1) = Request("VendorCountry")
	arFormFields0(2) = "VendorEmailAddress"
	arFormDBFields0(2) = "VendorEmailAddress"
	arFormValues0(2) = Request("VendorEmailAddress")
	arFormFields0(3) = "VendorAcceptsWebOrders"
	arFormDBFields0(3) = "VendorAcceptsWebOrders"
	arFormValues0(3) = Request("VendorAcceptsWebOrders")
	arFormFields0(4) = "Vendor1099"
	arFormDBFields0(4) = "Vendor1099"
	arFormValues0(4) = Request("Vendor1099")
	arFormFields0(5) = "VendorWebAddress"
	arFormDBFields0(5) = "VendorWebAddress"
	arFormValues0(5) = Request("VendorWebAddress")
	arFormFields0(6) = "VendorPhone"
	arFormDBFields0(6) = "VendorPhone"
	arFormValues0(6) = Request("VendorPhone")
	arFormFields0(7) = "VendorFax"
	arFormDBFields0(7) = "VendorFax"
	arFormValues0(7) = Request("VendorFax")
	arFormFields0(8) = "VendorTaxable"
	arFormDBFields0(8) = "VendorTaxable"
	arFormValues0(8) = Request("VendorTaxable")
	arFormFields0(9) = "VendorContact"
	arFormDBFields0(9) = "VendorContact"
	arFormValues0(9) = Request("VendorContact")
	arFormFields0(10) = "VendorState"
	arFormDBFields0(10) = "VendorState"
	arFormValues0(10) = Request("VendorState")
	arFormFields0(11) = "VendorZip"
	arFormDBFields0(11) = "VendorZip"
	arFormValues0(11) = Request("VendorZip")
	arFormFields0(12) = "VendorCity"
	arFormDBFields0(12) = "VendorCity"
	arFormValues0(12) = Request("VendorCity")
	arFormFields0(13) = "VendorSummaryofMaterials"
	arFormDBFields0(13) = "VendorSummaryofMaterials"
	arFormValues0(13) = Request("VendorSummaryofMaterials")
	arFormFields0(14) = "VendorName"
	arFormDBFields0(14) = "VendorName"
	arFormValues0(14) = Request("VendorName")

	FP_SaveFormFields fp_rs, arFormFields0, arFormDBFields0


	fp_rs.Update
	FP_DumpError strErrorUrl, "Cannot update the database"

	fp_rs.Close
	fp_conn.Close

	Session("FP_SavedFields")=arFormFields0
	Session("FP_SavedValues")=arFormValues0
	Session.CodePage = Session("FP_OldCodePage")
	Session.LCID = Session("FP_OldLCID")
	Response.Redirect "New_Vendor2.asp"

End If
End If

Session.CodePage = Session("FP_OldCodePage")
Session.LCID = Session("FP_OldLCID")

%>
<html>

<head>
<meta http-equiv="Content-Language" content="en-us">
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>STYROCHEM</title>
<style>
<!--
h1
	{margin-top:12.0pt;
	margin-right:0in;
	margin-bottom:3.0pt;
	margin-left:0in;
	page-break-after:avoid;
	font-size:16.0pt;
	font-family:Arial;
	}
-->
</style>
</head>

<body>

<form method="POST" action="--WEBBOT-SELF--">
  <!--webbot bot="SaveDatabase" suggestedext="asp" u-asp-include-url="../../_fpclass/fpdbform.inc" s-dataconnection="Purchase_Orders" s-recordsource="tblVendors_PO" u-database-url="../../fpdb/db1_db1.mdb" u-confirmation-url="New_Vendor2.asp" s-form-fields="VendorAddress VendorCountry VendorEmailAddress VendorAcceptsWebOrders Vendor1099 VendorWebAddress VendorPhone VendorFax VendorTaxable VendorContact VendorState VendorZip VendorCity VendorSummaryofMaterials VendorName" s-form-dbfields="VendorAddress VendorCountry VendorEmailAddress VendorAcceptsWebOrders Vendor1099 VendorWebAddress VendorPhone VendorFax VendorTaxable VendorContact VendorState VendorZip VendorCity VendorSummaryofMaterials VendorName" startspan --><input TYPE="hidden" NAME="VTI-GROUP" VALUE="0"><!--#include file="../../_fpclass/fpdbform.inc"--><!--webbot bot="SaveDatabase" endspan i-checksum="43152" --><h1 align="center" style="text-align: center">
  <font color="#99CCFF"><span style="font-family: Verdana">STYROCHEM</span></font></h1>
  <h1 align="center" style="text-align: center"><font color="#99CCFF">New  
  Vendor Sheet</font></h1>
  <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="92%" id="AutoNumber1" height="335">
    <tr>
      <td width="50%" height="22" colspan="2"><b>Vendor Name:    
      </b></td>
      <td width="72%" height="22" colspan="2">
      <input type="text" name="VendorName" size="36"></td>
    </tr>
    <tr>
      <td width="50%" height="22" colspan="2"><b>Vendor Address: </b></td>
      <td width="72%" height="22" colspan="2">
      <input type="text" name="VendorAddress" size="36"></td>
    </tr>
    <tr>
      <td width="50%" height="22" colspan="2"><b>City:   </b>                
      </td>
      <td width="72%" height="22" colspan="2">
      <input type="text" name="VendorCity" size="20"></td>
    </tr>
    <tr>
      <td width="50%" height="22" colspan="2"><b>State/Providence: </b></td>
      <td width="72%" height="22" colspan="2">
      <select size="1" name="VendorState">
      <option selected>Please select state or province</option>
      <option value="AL">ALABAMA</option>
      <option value="AK">ALASKA</option>
      <option value="AS">AMERICAN SAMOA</option>
      <option value="AZ">ARIZONA</option>
      <option value="AR">ARKANSAS</option>
      <option value="CA">CALIFORNIA</option>
      <option value="CO">COLORADO</option>
      <option value="CT">CONNECTICUT</option>
      <option value="DE">DELAWARE</option>
      <option value="DC">DISTRICT OF COLUMBIA</option>
      <option value="FM">FEDERATED STATES OF MICRONESIA</option>
      <option value="FL">FLORIDA</option>
      <option value="GA">GEORGIA</option>
      <option value="GU">GUAM</option>
      <option value="HI">HAWAII</option>
      <option value="ID">IDAHO</option>
      <option value="IL">ILLINOIS</option>
      <option value="IN">INDIANA</option>
      <option value="IA">IOWA</option>
      <option value="KS">KANSAS</option>
      <option value="KY">KENTUCKY</option>
      <option value="LA">LOUISIANA</option>
      <option value="ME">MAINE</option>
      <option value="MH">MARSHALL ISLANDS</option>
      <option value="MD">MARYLAND</option>
      <option value="MA">MASSACHUSETTS</option>
      <option value="MI">MICHIGAN</option>
      <option value="MN">MINNESOTA</option>
      <option value="MS">MISSISSIPPI</option>
      <option value="MO">MISSOURI</option>
      <option value="MT">MONTANA</option>
      <option value="NE">NEBRASKA</option>
      <option value="NV">NEVADA</option>
      <option value="NH">NEW HAMPSHIRE</option>
      <option value="NJ">NEW JERSEY</option>
      <option value="NM">NEW MEXICO</option>
      <option value="NY">NEW YORK</option>
      <option value="NC">NORTH CAROLINA</option>
      <option value="ND">NORTH DAKOTA</option>
      <option value="MP">NORTHERN MARIANA ISLANDS</option>
      <option value="OH">OHIO</option>
      <option value="OK">OKLAHOMA</option>
      <option value="OR">OREGON</option>
      <option value="PW">PALAU</option>
      <option value="PA">PENNSYLVANIA</option>
      <option value="PR">PUERTO RICO</option>
      <option value="RI">RHODE ISLAND</option>
      <option value="SC">SOUTH CAROLINA</option>
      <option value="SD">SOUTH DAKOTA</option>
      <option value="TN">TENNESSEE</option>
      <option value="TX">TEXAS</option>
      <option value="UT">UTAH</option>
      <option value="VT">VERMONT</option>
      <option value="VI">VIRGIN ISLANDS</option>
      <option value="VA">VIRGINIA</option>
      <option value="WA">WASHINGTON</option>
      <option value="WV">WEST VIRGINIA</option>
      <option value="WI">WISCONSIN</option>
      <option value="WY">WYOMING</option>
      <option value="AB">CANADA - ALBERTA</option>
      <option value="BC">CANADA - BRITISH COLUMBIA</option>
      <option value="MB">CANADA - MANITOBA</option>
      <option value="NB">CANADA - NEW BRUNSWICK</option>
      <option value="NL">CANADA - NEWFOUNDLAND AND LABRADOR</option>
      <option value="NT">CANADA - NORTHWEST TERRITORIES</option>
      <option value="NS">CANADA - NOVA SCOTIA</option>
      <option value="NU">CANADA - NUNAVUT</option>
      <option value="ON">CANADA - ONTARIO</option>
      <option value="PE">CANADA - PRINCE EDWARD ISLAND</option>
      <option value="QC">CANADA - QUEBEC</option>
      <option value="SK">CANADA - SASKATCHEWAN</option>
      <option value="YT">CANADA - YUKON</option>
      </select></td>
    </tr>
    <tr>
      <td width="33%" height="22">
      <p align="left"><b>Zip:  </b></td>
      <td width="26%" height="22">
      <input type="text" name="VendorZip" size="10"></td>
      <td width="23%" height="22">
      <p align="left"><b>Country: </b></td>
      <td width="43%" height="22">
      <select size="1" name="VendorCountry">
      <option selected>Please select country</option>
      <option>United States</option>
      <option>Canada</option>
      <option>China</option>
      <option>France</option>
      <option>Korea</option>
      </select></td>
    </tr>
    <tr>
      <td width="33%" height="1">
      <p align="left"><b>Telephone Number:  </b></td>
      <td width="26%" height="1">
      <input type="text" name="VendorPhone" size="10"></td>
      <td width="23%" align="center" height="1">
      <p align="left"><b>Fax Number: </b></td>
      <td width="43%" height="1"><input type="text" name="VendorFax" size="10"></td>
    </tr>
    <tr>
      <td width="47%" height="23" colspan="2">
      <p align="left"><b>Vendor Category: </b></td>
      <td width="55%" height="23" colspan="2">
      <p align="left"><nobr>
      
<% if 0 then %>
<SCRIPT Language="JavaScript">
document.write("<div style='background: yellow; color: black;'>The Database Results component on this page is unable to display database content. The page must have a filename ending in '.asp', and the web must be hosted on a server that supports Active Server Pages.</div>");
      </SCRIPT>
<% end if %>
<%
fp_sQry="SELECT * FROM tblVendor_Categories_PO"
fp_sDefault=""
fp_sNoRecords="No records returned."
fp_sDataConn="Purchase_Orders"
fp_iMaxRecords=256
fp_iCommandType=1
fp_iPageSize=0
fp_fTableFormat=False
fp_fMenuFormat=True
fp_sMenuChoice="VendorCategory"
fp_sMenuValue="VendorCategory"
fp_sColTypes="&VendorCategory=202&"
fp_iDisplayCols=1
fp_fCustomQuery=False
BOTID=0
fp_iRegion=BOTID
%>
      
      </nobr></td>
    </tr>
    <tr>
      <td width="47%" height="52" colspan="2"><b>Summary of materials supplied 
      by vendor: </b></td>
      <td width="55%" height="52" colspan="2">
      <textarea rows="2" name="VendorSummaryofMaterials" cols="30"></textarea></td>
    </tr>
    <tr>
      <td width="47%" height="22" colspan="2"><b>Vendor Contact:  </b></td>
      <td width="55%" height="22" colspan="2">
      <input type="text" name="VendorContact" size="20"></td>
    </tr>
    <tr>
      <td width="47%" height="22" colspan="2"><b>Email address:    
      </b></td>
      <td width="55%" height="22" colspan="2">
      <input type="text" name="VendorEmailAddress" size="20"></td>
    </tr>
    <tr>
      <td width="47%" height="22" colspan="2"><b>Web Address:</b> </td>
      <td width="55%" height="22" colspan="2">
      <input type="text" name="VendorWebAddress" size="37"></td>
    </tr>
    <tr>
      <td width="47%" height="38" colspan="2"><b>Does this vendor accept orders 
      via the web?:</b> </td>
      <td width="55%" height="38" colspan="2">
      <input type="radio" value="Yes" name="VendorAcceptsWebOrders">YES  
      <input type="radio" name="VendorAcceptsWebOrders" value="No3">NO  </td>
    </tr>
    <tr>
      <td width="100%" height="21" colspan="4"><b>Taxable:</b>            
      <input type="radio" name="VendorTaxable" value="YES">YES  
      <input type="radio" name="VendorAcceptsWebOrders" value="NO">NO </td>
    </tr>
    <tr>
      <td width="100%" height="21" colspan="4"><b>1099 Vendor:</b>     <input type="radio" name="Vendor1099" value="YES">YES  
      <input type="radio" name="Vendor1099" value="NO">NO  
      <input type="radio" name="Vendor1099" value="Not Sure">NOT SURE</td>
    </tr>
  </table>
  <p align="center"><input type="submit" value="Send Form"><input type="reset" value="Reset"></p>
</form>

</body>

</html>

Form 2 -

<html>

<head>
<meta http-equiv="Content-Language" content="en-us">
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>STYROCHEM</title>
<style>
<!--
h1
	{margin-top:12.0pt;
	margin-right:0in;
	margin-bottom:3.0pt;
	margin-left:0in;
	page-break-after:avoid;
	font-size:16.0pt;
	font-family:Arial;
	}
-->
</style>
</head>

<body>

<form method="GET" action="../../formmail_NewVendor.asp">
  <h1 align="center" style="text-align: center">
  <font color="#99CCFF"><span style="font-family: Verdana">STYROCHEM</span></font></h1>
  <h1 align="center" style="text-align: center"><font color="#99CCFF">New  
  Vendor Sheet</font></h1>
  <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="92%" id="AutoNumber1" height="335">
    <tr>
      <td width="40%" height="22" colspan="2"><b>Vendor Name:    
      </b></td>
      <td width="82%" height="22" colspan="2">
      <input type="text" name="VendorName" size="36" value="<%=Request.form("VendorName")%> "></td>
    </tr>
    <tr>
      <td width="40%" height="22" colspan="2"><b>Vendor Address: </b></td>
      <td width="82%" height="22" colspan="2">
      <input type="text" name="VendorAddress" size="36" value="<%=Request.Form("VendorAddress")%> "></td>
    </tr>
    <tr>
      <td width="40%" height="22" colspan="2"><b>City:   </b>                
      </td>
      <td width="82%" height="22" colspan="2">
      <input type="text" name="VendorCity" size="20" value="<%=Request.Form("VendorCity")%> "></td>
    </tr>
    <tr>
      <td width="40%" height="22" colspan="2"><b>State/Providence: </b></td>
      <td width="82%" height="22" colspan="2">
      <input type="text" name="VendorState" size="20" value="<%=Request.Form("VendorState")%> "></td>
    </tr>
    <tr>
      <td width="33%" height="22">
      <p align="left"><b>Zip:  </b></td>
      <td width="16%" height="22">
      <input type="text" name="VendorZip" size="10" value="<%=Request.Form("VendorZip")%>"></td>
      <td width="33%" height="22">
      <p align="left"><b>Country: </b></td>
      <td width="43%" height="22">
      <input type="text" name="VendorCountry" size="20" value="<%=Request.Form("VendorCountry")%> "></td>
    </tr>
    <tr>
      <td width="33%" height="1">
      <p align="left"><b>Telephone Number:  </b></td>
      <td width="16%" height="1">
      <input type="text" name="VendorPhone" size="10" value="<%=Request.Form("VendorPhone")%> "></td>
      <td width="33%" align="center" height="1">
      <p align="left"><b>Fax Number: </b></td>
      <td width="43%" height="1">
      <input type="text" name="VendorFax" size="10" value="<%=Request.Form("VendorFax")%> "></td>
    </tr>
    <tr>
      <td width="19%" height="22"><b>Vendor Contact:  </b></td>
      <td width="83%" height="22" colspan="3">
      <input type="text" name="VendorContact" size="32" value="<%=Request.Form("VendorContact")%> "></td>
    </tr>
    <tr>
      <td width="100%" height="21" colspan="4"><b>Taxable:</b>            
      <input type="text" name="VendorTaxable" size="20" value="<%=Request.Form("VendorTaxable")%> "></td>
    </tr>
    <tr>
      <td width="100%" height="21" colspan="4"><b>1099 Vendor:</b>     <input type="text" name="Vendor1099" size="20" value="<%=Request.Form("Vendor1099")%> "></td>
    </tr>
  </table>
  <p align="center"><input type="submit" value="Confirm"><input type="reset" value="Reset"></p>
  <input type="hidden" name="VendorNumber" value="PENDING">
  <input type="hidden" name="recipient" value="jgreer@styrochem.com">
  <input type="hidden" name="redirect" value="http://intranet.styrochem.com">
  <input type="hidden" name="subject" value="New Vendor Request">
</form>

</body>

</html>

(in reply to ou812)
BeTheBall

 

Posts: 6381
Joined: 6/21/2002
From: West Point Utah USA
Status: offline

 
RE: Passover Information - 8/30/2004 8:20:51   
quote:

The first page sends the info to the database and then when it goes to the second there is no info carried over


Aha. Therein lies the problem. I am guessing that you are using the FP "Send to Database" option, right? If that's the case, you will need to use a DRW on the second page to retrieve the record you just submitted on the first page. The form values are normally lost once you submit to the database.

_____________________________

Duane

Some people are like Slinkies . . . Not really good for anything . . . . . But they still bring a smile to your face when you push them down a flight of stairs.

(in reply to styrochem)
styrochem

 

Posts: 212
Joined: 5/11/2004
Status: offline

 
RE: Passover Information - 8/30/2004 8:22:33   
So on the second page do I put in a query at the top?

(in reply to BeTheBall)
BeTheBall

 

Posts: 6381
Joined: 6/21/2002
From: West Point Utah USA
Status: offline

 
RE: Passover Information - 8/30/2004 15:03:38   
Just open the page in normal view and insert a Database Results Region whereever you want it.

_____________________________

Duane

Some people are like Slinkies . . . Not really good for anything . . . . . But they still bring a smile to your face when you push them down a flight of stairs.

(in reply to styrochem)
styrochem

 

Posts: 212
Joined: 5/11/2004
Status: offline

 
RE: Passover Information - 8/31/2004 11:18:09   
No criteria requirements are needed?

(in reply to BeTheBall)
BeTheBall

 

Posts: 6381
Joined: 6/21/2002
From: West Point Utah USA
Status: offline

 
RE: Passover Information - 8/31/2004 11:55:27   
Guessing you are using a redirect to get to the second page? If so, then yes, you will want to pass in the ID number of the record you just added. I would follow this Spooky tutorial:

http://www.outfront.net/spooky/adv_new_id.htm

_____________________________

Duane

Some people are like Slinkies . . . Not really good for anything . . . . . But they still bring a smile to your face when you push them down a flight of stairs.

(in reply to styrochem)
styrochem

 

Posts: 212
Joined: 5/11/2004
Status: offline

 
RE: Passover Information - 8/31/2004 12:25:40   
Would I add each field on form 1 to under fp_rs.Update?

(in reply to BeTheBall)
BeTheBall

 

Posts: 6381
Joined: 6/21/2002
From: West Point Utah USA
Status: offline

 
RE: Passover Information - 8/31/2004 12:28:51   
No, just the ID. Since the ID is unique, that is sufficient for the DRW to be able to identify and retrieve the record. Out of curiosity, what happens on the 2nd form?

_____________________________

Duane

Some people are like Slinkies . . . Not really good for anything . . . . . But they still bring a smile to your face when you push them down a flight of stairs.

(in reply to styrochem)
styrochem

 

Posts: 212
Joined: 5/11/2004
Status: offline

 
RE: Passover Information - 8/31/2004 12:33:25   
The second form, once it has retrieved all information then transmits the request to email notifying an accounting department of new vendor.

(in reply to BeTheBall)
BeTheBall

 

Posts: 6381
Joined: 6/21/2002
From: West Point Utah USA
Status: offline

 
RE: Passover Information - 8/31/2004 14:25:14   
What email component are you using?

_____________________________

Duane

Some people are like Slinkies . . . Not really good for anything . . . . . But they still bring a smile to your face when you push them down a flight of stairs.

(in reply to styrochem)
styrochem

 

Posts: 212
Joined: 5/11/2004
Status: offline

 
RE: Passover Information - 8/31/2004 14:43:22   
A formmail script developed by Sorted Sites. Has worked well for us so far.

(in reply to BeTheBall)
BeTheBall

 

Posts: 6381
Joined: 6/21/2002
From: West Point Utah USA
Status: offline

 
RE: Passover Information - 8/31/2004 15:31:55   
Just wondering if it could be inserted into the page that does your db insert so you don't have to have two forms, instead the user completes the form and the insert and email are done all at once. I have successfully inserted CDONTS scripts into the "Send to Database" page, but not sure how well it works with other email components.

_____________________________

Duane

Some people are like Slinkies . . . Not really good for anything . . . . . But they still bring a smile to your face when you push them down a flight of stairs.

(in reply to styrochem)
styrochem

 

Posts: 212
Joined: 5/11/2004
Status: offline

 
RE: Passover Information - 9/9/2004 8:11:22   
I wish there was a method to perform this task using a single form. At the moment I have three for this task but haven't found any alternatives in terms of codes online. Any idea's would be appreciated.

(in reply to BeTheBall)
BeTheBall

 

Posts: 6381
Joined: 6/21/2002
From: West Point Utah USA
Status: offline

 
RE: Passover Information - 9/9/2004 12:59:42   
Can you post the email script? Once I get a look at it, perhaps I can recommend a way for you to paste it into the page that contains your submission form.

_____________________________

Duane

Some people are like Slinkies . . . Not really good for anything . . . . . But they still bring a smile to your face when you push them down a flight of stairs.

(in reply to styrochem)
styrochem

 

Posts: 212
Joined: 5/11/2004
Status: offline

 
RE: Passover Information - 9/10/2004 9:23:29   
This is the script I am using to generate the emails.

<%@ Language = vbscript%>
<%option explicit %>
<%server.scripttimeout = 600 %>
<%
'------------------------------------------- FORMMAIL V1.3 ------------------------------------------

'----------------------------------------------------------------------------------------------------
'copyright information
'----------------------------------------------------------------------------------------------------
'Copyright 2002: Sorted Sites http://www.sortedsites.com
'Authors Jonas Tornqvist, David Parkes and Karl Snares
'This script is Freeware, which means you are free to use and modify
'the script for your own use.
'The only condition is this copyright header remain intact and you don't
'try and sell this script for profit without first asking us.
'And of course also ask Matt Wright who wrote the original perl version of Formmail.

'----------------------------------------------------------------------------------------------------
'license agreement - Important
'----------------------------------------------------------------------------------------------------
'By using this script you agree to indeminfy the developers - Sorted Sites of any loss
'or damages that may arise from its use or missue.
'This script is provided as is with all faults - no warranties and no guarantees.
'basically its free - use it at your own risk and cost.
'No warranties and no tech support - if you need help with this don't ask us!
'The documentation is provided as is with all the help we can offer.
'As we develop this script we shall post updates hopefully fix any bugs
'We are not obliged to release any future versions and we might not bother...
'By using this script you accept this license agreement!

'----------------------------------------------------------------------------------------------------
'documentation v1.3
'----------------------------------------------------------------------------------------------------

'####################################################################################################
'this is where the code starts for real
'####################################################################################################

'----------------------------------------------------------------------------------------------------
'declare variables
'----------------------------------------------------------------------------------------------------
Dim strFrom, strTo, strSubject, strBody
Dim objMessage, objConfig, strServer, intPort
Dim recipient, redirect, subject, realname, email, required, strEmail1, strEmail2
Dim referer, url, url_verified, icounter, query, iloop, query2, query3, i, agree, validation, error0, error0ok

'############################## CONFIGURATION VARIABLES ####################################

'These are the only lines you will need to change
'----------------------------------------------------------------------------------------------------
strServer = "10.1.81.13" 'set which smtp server will be used to send the email. enter ip address or domain name. eg: "xxx.xxx.xxx.xxx" or "smtp.your-domain.com"
intPort = 25 'set the smtp port to be used when sending mail (by default port 25 is used)
'Referrer's Array is defined here. Enter the valid domains which may use this script.
url = Array("10.1.81.12","styrochem.com")'Set which urls that will be accepted. http://xxxxx/
'Seperate multiple domains by commas
'eg: url= Array("www.your-domain.com","your-domain.com","www.my-domain.com")
'computer names can be used instead of domains if this script is being run locally
'eg: url = Array("computername")

'######################################### IMPORTANT NOTICE #########################################
'IMPORTANT: do not modify anything below this line unless you know what you are doing!!
'######################################### IMPORTANT NOTICE #########################################

'----------------------------------------------------------------------------------------------------
'information type and CDOSYS constants
'----------------------------------------------------------------------------------------------------
%>
<!--METADATA TYPE="typelib"
UUID="CD000000-8B95-11D1-82DB-00C04FB1625D"
NAME="CDO for Windows 2000 Library" -->
<!--METADATA TYPE="typelib"
UUID="00000205-0000-0010-8000-00AA006D2EA4"
NAME="ADODB Type Library" -->
<%
'----------------------------------------------------------------------------------------------------
'retrieved default fields
'----------------------------------------------------------------------------------------------------
recipient = request("recipient")
redirect = request("redirect")
subject = request("subject")
email = request("email")
required = request("required")
if required = "" then
required = "recipient,subject,email,redirect"
else
required = "recipient,subject,email,redirect," & required
end if

'----------------------------------------------------------------------------------------------------
'verify the referer
'----------------------------------------------------------------------------------------------------
referer = request.ServerVariables("HTTP_REFERER")
referer = split(referer,"/")
url_verified = "no"
for icounter = Lbound(url) to Ubound(url) '
if referer(2) = url(icounter) then
url_verified = "yes"
end if
next
if not url_verified = "yes" then
response.write("The url specified is invalid!")
response.End
end if

'----------------------------------------------------------------------------------------------------
'verify the recipient(not tested)
'----------------------------------------------------------------------------------------------------
'trimed_referer = split(referer(2),".")'
'response.write recipient & "<br>" & referer(2) & "=" & trimed_referer(0) & "<br>"
'if trimed_referer(0) = "www" then
' if InStr(1,recipient,trimed_referer(1),1) = 0 then
' response.write "recipient don't match the referer"
' response.end
' end if
'else
' if InStr(1,recipient,trimed_referer(0),1) = 0 then
' response.write "recipient don't match the referer"
' response.end
' end if
'end if

'----------------------------------------------------------------------------------------------------
'retrieve form contents and create email fields
'----------------------------------------------------------------------------------------------------
query = Request.ServerVariables("QUERY_STRING")
query = split(query,"&")
query3 = split(required,",")
For iLoop = Lbound(query) to UBound(query)
query2 = split(query(iloop),"=")

'----------------------------------------------------------------------------------------------------
'form validation, checks required fields are not null
'----------------------------------------------------------------------------------------------------
for i = LBound(query3) to UBound(query3)
if query3(i) = query2(0) then
if query2(1) = "" then
response.write ("you must enter a valid ") & query2(0)
response.end
end if
end if

'if query2(0) = "agree" then
'if query2(1) <> "on" or query2(1) = "" then
' response.write("You must agree to terms and conditions to enable Formmailv1.3 to execute!")
'response.end
'end if
'end if

'----------------------------------------------------------------------------------------------------
'form validation, checks a valid email address has been specified
'----------------------------------------------------------------------------------------------------
if query2(0) = "email" then
trim(query2(0))
if len(query2(1))<8 then
response.Write("You must specify a valid ") & query2(0)
response.end
end if
if instr(query2(1),"@")=0 and instr(query2(1),".")=0 then
response.write query2(1)
response.Write("You must specify a valid ") & query2(0)
response.end
end if
strEmail1 = split(query2(1),"@")
if len(strEmail1(1))<3 then
response.Write("You must specify a valid ") & query2(0)
response.end
end if
strEmail2 = split(strEmail1(1),".")
if len(strEmail2(0))<3 then
response.Write("You must specify a valid ") & query2(0)
response.end
end if
if len(strEmail2(1))<2 then
response.Write("You must specify a valid ") & query2(0)
response.end
end if
end if

'----------------------------------------------------------------------------------------------------
'form validation, checks terms and conditions checkbox has been ticked
'----------------------------------------------------------------------------------------------------

Next
if not query2(0) = "recipient" and not query2(0) = "redirect" and not query2(0) = "subject" and not query2(0) = "realname" and not query2(0) = "email" and not query2(0) = "required" and not query2(0) = "agree" then
strBody = strBody & vbnewline & vbnewline & query2(0) &": " & query2(1)
end if
Next
if email = "" then
email = "formmail@" & referer(2)
end if
'----------------------------------------------------------------------------------------------------
'replaces any special characters parsed through the query string
'----------------------------------------------------------------------------------------------------
strbody = replace(strbody, "+"," ")
strbody = replace(strbody, "%26%238364%3B","€")
strbody = replace(strbody, "%A1","¡")
strbody = replace(strbody, "%A3","£")
strbody = replace(strbody, "%A8","¨")
strbody = replace(strbody, "%AA","ª")
strbody = replace(strbody, "%AC","¬")
strbody = replace(strbody, "%B4","´")
strbody = replace(strbody, "%B7","·")
strbody = replace(strbody, "%BA","º")
strbody = replace(strbody, "%BF","¿")
strbody = replace(strbody, "%C7","Ç")
strbody = replace(strbody, "%E7","ç")
strbody = replace(strbody, "%0D%0A",vbnewline)
strbody = replace(strbody, "%21","!")
strbody = replace(strbody, "%23","#")
strbody = replace(strbody, "%24","$")
strbody = replace(strbody, "%25","%")
strbody = replace(strbody, "%26","&")
strbody = replace(strbody, "%27","'")
strbody = replace(strbody, "%28","(")
strbody = replace(strbody, "%29",")")
strbody = replace(strbody, "%2B","+")
strbody = replace(strbody, "%2C",",")
strbody = replace(strbody, "%2D","-")
strbody = replace(strbody, "%2E",".")
strbody = replace(strbody, "%2F","/")
strbody = replace(strbody, "%3A",":")
strbody = replace(strbody, "%3B",";")
strbody = replace(strbody, "%3C","<")
strbody = replace(strbody, "%3D","=")
strbody = replace(strbody, "%3E",">")
strbody = replace(strbody, "%3F","?")
strbody = replace(strbody, "%5B","[")
strbody = replace(strbody, "%5C","\")
strbody = replace(strbody, "%5D","]")
strbody = replace(strbody, "%5E","^")
strbody = replace(strbody, "%5F","_")
strbody = replace(strbody, "%60","`")
strbody = replace(strbody, "%7B","{")
strbody = replace(strbody, "%7C","|")
strbody = replace(strbody, "%7D","}")
strbody = replace(strbody, "%7E","~")

'----------------------------------------------------------------------------------------------------
'this creates the body of the mail message, the text in quotes can be modified accordingly
'---------------------------------------------------------------------------------------------------
strBody = "Here is the results of your form submitted from" & referer(2) & vbnewline & vbnewline & "Name: " & realname & vbnewline & vbnewline & "Email: " & email & vbnewline & strBody & vbnewline & vbnewline & "############# End Formmail Tranmission #############"

'----------------------------------------------------------------------------------------------------
'checks if a smtp port has been specified, if not it uses the default port 25
'----------------------------------------------------------------------------------------------------
if intport <> 25 then
intport = intport
else
intport = 25
end if

'----------------------------------------------------------------------------------------------------
'send the mail message
'----------------------------------------------------------------------------------------------------
set objMessage = CreateObject("CDO.Message")
objMessage.To = recipient
objMessage.From = email
objMessage.Subject = subject
objMessage.Sender = email
objMessage.Textbody = strBody

'----------------------------------------------------------------------------------------------------
'cdosys configuration setup
'----------------------------------------------------------------------------------------------------
set objConfig = CreateObject("CDO.Configuration")
objConfig.Fields(cdoSendUsingMethod) = cdoSendUsingPort
objConfig.Fields(cdoSMTPServer) = strServer
objConfig.Fields(cdoSMTPServerPort) = intPort
objConfig.Fields(cdoSMTPAuthenticate) = cdoAnonymous
objConfig.Fields.Update
set objMessage.Configuration = objConfig

'----------------------------------------------------------------------------------------------------
'define error handling procedures
'----------------------------------------------------------------------------------------------------
On Error Resume Next
objMessage.Send
If Err.Number = 0 then
response.write("Formmail v1.3 processed all operations successfully!")
else
response.write("Formmail v1.3 detected the following errors:")& "<br>"
response.write("error no.: ")&err.number & "<br>"
response.write("description: ")&err.description & "<br>"
response.end
End If
On Error Goto 0

'----------------------------------------------------------------------------------------------------
'send them to the page specified
'----------------------------------------------------------------------------------------------------
Response.Redirect redirect

'####################################################################################################
'This is where the code ends
'####################################################################################################
%><!-- That's All Folks --><!-- Happy Surfing --><!-- Credits --><!-- David Parkes - Project Planning --><!-- Jonas Tornqvist - Lead Programmer version 1--><!-- Karl Snares - Lead Programmer version 1.2 & 1.3
<!-- Matt Wright - Original Formmail CGI Developer -->

(in reply to BeTheBall)
Page:   [1]

All Forums >> Web Development >> ASP and Database >> Passover Information
Page: [1]
Jump to: 1





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts