Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sending data between pages

Status
Not open for further replies.

gcastillo

Programmer
Jun 9, 2000
127
MX
I am inserting 12 datafields in a database with a form in an asp page (12 form objects). After inserting the data via a Submit button, the user is token to another page, and I need to receive only TWO fields from the first page in my second page. How can I send them? I am using Dreamweaver-Ultradev.
 
Here you go gcastillo,
Here's a sample of a page I have on my intranet. The following code is from my post page (after user submits page).

***************** This inserts into my table **************
<%
SQL=&quot;INSERT INTO input_table (name, date, department, suggestion) Values (&quot;&amp;_
&quot;'&quot;&amp; request.form(&quot;name&quot;)&amp; &quot;', &quot; &amp;_
&quot;'&quot;&amp; request.form(&quot;date1&quot;)&amp; &quot;', &quot; &amp;_
&quot;'&quot;&amp; request.form(&quot;department&quot;)&amp; &quot;', &quot; &amp;_
&quot;'&quot;&amp; request.form(&quot;suggestion&quot;)&amp; &quot;')&quot;
Dim myRS
set myRS=server.createobject(&quot;ADODB.recordset&quot;)
myRS.open SQL, &quot;dsn=Suggestions&quot;
%>
***************** This inserts into my table **************
****************** and sets my Record Set *****************

Then on this table withing the same page, I post only what I want to see from the user input.

Code:
<table>
    <tr>
      <td width=&quot;36%&quot; align=&quot;right&quot;><font color=&quot;#000080&quot; size=&quot;3&quot;>Name:</font></td>
      <td width=&quot;64%&quot;><%=request.form(&quot;Name&quot;)%></td>
    </tr>
    <tr>
      <td width=&quot;36%&quot; align=&quot;right&quot;><font color=&quot;#000080&quot; size=&quot;3&quot;>Date
        Suggested:</font></td>
      <td width=&quot;64%&quot;><%=request.form(&quot;Date1&quot;)%></td>
    </tr>
    <tr>
</table>







QUOTE OF THE DAY
I will prepare, and some day my chance will come.
Abraham Lincoln

<%
Jr_Clown :eek:)
%>
 
Thank you for your answer, but the browser displays this message:
&quot;Microsoft VBScript runtime error '800a01b6'

Object doesn't support this property or method: 'form' &quot;

Of course, form is the name of the form I'm using... any help will be greatly appreciated...

 

May I suggest to display your code below so that I and others that are more familiar with VBScript can help your obstacle?. QUOTE OF THE DAY
Don't waste time telling people what you are doing or what you are going to do. Results have a way of informing the world.

<%
Jr Clown :eek:)
%>
 
I use Dreamweaver-Ultradev, so the code for the insert is pretty long. It works fine. The rest is very simple in my example:
<html>
<head>
<title>Example</title>
</head>
<body >
<form name=&quot;form1&quot; method=&quot;post&quot; action=&quot;<%=MM_editAction%>&quot;>
<input type=&quot;text&quot; name=&quot;Name&quot; value=&quot;Name&quot;>
<input type=&quot;submit&quot; name=&quot;Submit&quot; value=&quot;Submit&quot;>
<input type=&quot;hidden&quot; name=&quot;MM_insert&quot; value=&quot;true&quot;>
</form>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top