passing data from one page to another

M

Michael Stumpo

I am sure this has been asked more times than can be
counted. Howsever.

I have an intranet that allows users to fill out forms
for faxes and transmittals and then send that data to the
database. Once the user has filled out a form for either,
I would like the actual fax/transmittal page (preview
page) to come up with the data entered.

If they need to change something, they can go back and
correct and re-submit to the preview page. Once they have
accepted all the information, they can print that page
and then submit it to the database for historial use.

I have my fax_create.asp page posting to fax_preview.asp,
however, the data does not show up in fax_preview.asp. It
is just blank. I have all the text fields that contain
the <%=fieldname%> variable in the form.

What am I missing?

Any help would be appreciated.

-M
 
M

Mikeal H.

Michael,

This is what I have done to resolve this..... Put this code at the top
of your page before the <html> & <head>.

<%OPTION EXPLICIT%>
<%Dim field1,field2,field3,%>
<html>

<head>

field1, field2 and field3 are examples of field names. Replace those
with all of the field names that you want to display on this page from
the other.

Next, place the following line inside the <body> of you code.

<%field1 = request.form("field1")%>
<%field2 = request.form("field2")%>
<%field3 = request.form("field3")%>
and so on..........

Finally, put this code where you want to actually display the information
that was entered on the prior page.

<%response.write field1%>

I hope this helps.
Let me know if you need any more assistance.

Mikeal H.
 
T

Thomas A. Rowe

You can save a few lines of code by just doing the following where ever you
need to display the content:

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

and to then pass the content onto the next page or database use:

<form.....>
<input type="hidden" name="fieldname"
value="<%=Request.Form("Fieldname")%>">

--

==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, Forums, WebCircle,
MS KB Quick Links, etc.
==============================================
 
M

Michael Stumpo

Mikeal,

Thanks, that worked.

Tom, thanks for that. My next question was can I just
have hidden fields to get the information to the database.

Thanks to both.

-M
 
M

Mikeal H.

Thomas,

I have set up a form that passes data from on to the other, like Michael is
doing here. My problem is this... The first form gets filled out and they go
to the next and so on. They would fill in 5 forms before the final data is
submitted to the dbase. Before that happens, I have a confirmation page that
displays all of the information that has been entered. If there is a problem
with the information on of the fields they would have to use the back button
to go back to that page and correct the problem. My problem is that when
they do this they have to re-enter all of the information on the pages
following the one that they just corrected.

Is there any way around this?
 
T

Thomas A. Rowe

Ok, let me think about this.

--

==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, Forums, WebCircle,
MS KB Quick Links, etc.
==============================================
 
S

Stefan B Rusynko

Don't use a confirmation page as the last page (by that time the data has already been sent once),
Use a 6th form w/ all fields (from the prior 5 forms) for final edit and then send it

IMHO
- most user don't like daisy chain forms and give up half way thru the chain
(they would prefer to see all data required before starting)
- they understand Mortgage Apps are long (I trust it is a secure site)
- put the whole form on 1 page (send it to a 2nd form for "editing") and then send it to your database, and a confirmation page (to
print the final data for their records)




| It is an application for a Mortgage Loan. I have it set up so that the first
| page asks for their information and employment information. Then next form
| asks for ther bank account info. The next form asks for their current
| mortgage info. The next two forms ask for their cerdit card and other debt.
| Then there is a confirmation page.
|
|
| | > Yes, that is a problem, and I don't see a solution at the moment. What
| type
| > of application is this that you are building, that requires 5+ pages?
| >
| > --
| >
| > ==============================================
| > Thomas A. Rowe (Microsoft MVP - FrontPage)
| > WEBMASTER Resources(tm)
| >
| > FrontPage Resources, Forums, WebCircle,
| > MS KB Quick Links, etc.
| > ==============================================
| > To assist you in getting the best answers for FrontPage support see:
| > http://www.net-sites.com/sitebuilder/newsgroups.asp
| >
| > | > > Thomas,
| > >
| > > I have set up a form that passes data from on to the other, like Michael
| > is
| > > doing here. My problem is this... The first form gets filled out and
| they
| > go
| > > to the next and so on. They would fill in 5 forms before the final data
| is
| > > submitted to the dbase. Before that happens, I have a confirmation page
| > that
| > > displays all of the information that has been entered. If there is a
| > problem
| > > with the information on of the fields they would have to use the back
| > button
| > > to go back to that page and correct the problem. My problem is that when
| > > they do this they have to re-enter all of the information on the pages
| > > following the one that they just corrected.
| > >
| > > Is there any way around this?
| > >
| > > | > > > You have to post the fields to another page that post to the database,
| > it
| > > > could have all been on the same page, but you want the folks to be
| able
| > to
| > > > go back and change the data first.
| > > >
| > > > So you have to use hidden form fields and a submit button.
| > > >
| > > > --
| > > >
| > > > ==============================================
| > > > Thomas A. Rowe (Microsoft MVP - FrontPage)
| > > > WEBMASTER Resources(tm)
| > > >
| > > > FrontPage Resources, Forums, WebCircle,
| > > > MS KB Quick Links, etc.
| > > > ==============================================
| > > > To assist you in getting the best answers for FrontPage support see:
| > > > http://www.net-sites.com/sitebuilder/newsgroups.asp
| > > >
| > > > | > > > > Mikeal,
| > > > >
| > > > > Thanks, that worked.
| > > > >
| > > > > Tom, thanks for that. My next question was can I just
| > > > > have hidden fields to get the information to the database.
| > > > >
| > > > > Thanks to both.
| > > > >
| > > > > -M
| > > > >
| > > > > >-----Original Message-----
| > > > > >You can save a few lines of code by just doing the
| > > > > following where ever you
| > > > > >need to display the content:
| > > > > >
| > > > > ><%=Request.Form("Fieldname")%>
| > > > > >
| > > > > >and to then pass the content onto the next page or
| > > > > database use:
| > > > > >
| > > > > ><form.....>
| > > > > ><input type="hidden" name="fieldname"
| > > > > >value="<%=Request.Form("Fieldname")%>">
| > > > > >
| > > > > >--
| > > > > >
| > > > > >==============================================
| > > > > >Thomas A. Rowe (Microsoft MVP - FrontPage)
| > > > > >WEBMASTER Resources(tm)
| > > > > >
| > > > > >FrontPage Resources, Forums, WebCircle,
| > > > > >MS KB Quick Links, etc.
| > > > > >==============================================
| > > > > >To assist you in getting the best answers for FrontPage
| > > > > support see:
| > > > > >http://www.net-sites.com/sitebuilder/newsgroups.asp
| > > > > >
| > > > > >| > > > > >> Michael,
| > > > > >>
| > > > > >> This is what I have done to resolve this..... Put this
| > > > > code at the top
| > > > > >> of your page before the <html> & <head>.
| > > > > >>
| > > > > >> <%OPTION EXPLICIT%>
| > > > > >> <%Dim field1,field2,field3,%>
| > > > > >> <html>
| > > > > >>
| > > > > >> <head>
| > > > > >>
| > > > > >> field1, field2 and field3 are examples of field names.
| > > > > Replace those
| > > > > >> with all of the field names that you want to display
| > > > > on this page from
| > > > > >> the other.
| > > > > >>
| > > > > >> Next, place the following line inside the <body> of
| > > > > you code.
| > > > > >>
| > > > > >> <%field1 = request.form("field1")%>
| > > > > >> <%field2 = request.form("field2")%>
| > > > > >> <%field3 = request.form("field3")%>
| > > > > >> and so on..........
| > > > > >>
| > > > > >> Finally, put this code where you want to actually
| > > > > display the information
| > > > > >> that was entered on the prior page.
| > > > > >>
| > > > > >> <%response.write field1%>
| > > > > >>
| > > > > >> I hope this helps.
| > > > > >> Let me know if you need any more assistance.
| > > > > >>
| > > > > >> Mikeal H.
| > > > > >>
| > > > > >>
| > > > > >>
| > > > > message
| > > > > >> | > > > > >> > I am sure this has been asked more times than can be
| > > > > >> > counted. Howsever.
| > > > > >> >
| > > > > >> > I have an intranet that allows users to fill out
| > > > > forms
| > > > > >> > for faxes and transmittals and then send that data
| > > > > to the
| > > > > >> > database. Once the user has filled out a form for
| > > > > either,
| > > > > >> > I would like the actual fax/transmittal page (preview
| > > > > >> > page) to come up with the data entered.
| > > > > >> >
| > > > > >> > If they need to change something, they can go back
| > > > > and
| > > > > >> > correct and re-submit to the preview page. Once they
| > > > > have
| > > > > >> > accepted all the information, they can print that
| > > > > page
| > > > > >> > and then submit it to the database for historial use.
| > > > > >> >
| > > > > >> > I have my fax_create.asp page posting to
| > > > > fax_preview.asp,
| > > > > >> > however, the data does not show up in
| > > > > fax_preview.asp. It
| > > > > >> > is just blank. I have all the text fields that
| > > > > contain
| > > > > >> > the <%=fieldname%> variable in the form.
| > > > > >> >
| > > > > >> > What am I missing?
| > > > > >> >
| > > > > >> > Any help would be appreciated.
| > > > > >> >
| > > > > >> > -M
| > > > > >>
| > > > > >>
| > > > > >
| > > > > >
| > > > > >.
| > > > > >
| > > >
| > > >
| > >
| > >
| >
| >
|
|
 
T

Thomas A. Rowe

I agree with Stefan's response.

--

==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, Forums, WebCircle,
MS KB Quick Links, etc.
==============================================
 

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

Top