Post and redirect

G

Guest

currently i have a form that submits information entered by the user (we'll
call it page1) once the information is entered it is sent to a database and
the page redirects to its-self. that's all fine.
What i want to know is if a certain field (dropdown box) is YES, can i still
submit the information but redirect to another page, say page 2, fill the
information in, then when submited redirect back to page 1

i hope i've not confused anyone with the above, as i've usually got a habit
of not explaining myself correctly.

Any help would be appreciated.
 
S

Stefan B Rusynko

Yes
- but not w/ the FP Default forms handler
If you are using a server side script language to send the form to the DB
- then it depends on the language you are using
--




| currently i have a form that submits information entered by the user (we'll
| call it page1) once the information is entered it is sent to a database and
| the page redirects to its-self. that's all fine.
| What i want to know is if a certain field (dropdown box) is YES, can i still
| submit the information but redirect to another page, say page 2, fill the
| information in, then when submited redirect back to page 1
|
| i hope i've not confused anyone with the above, as i've usually got a habit
| of not explaining myself correctly.
|
| Any help would be appreciated.
|
 
G

Guest

Everything was set up through FP 2003, sending to Access DB, so i'd assume
it's using VBScript.
 
S

Stefan B Rusynko

If you don't know if it is VBscript (ASP) you probably shouldn't attempt below
- the pages should have a .asp extension if you are running ASP

At the top of your .asp page add
<%
Request.Form("yourformfieldnamehere")
If Request.Form("yourformfieldnamehere")="Yes" Then response.redirect "yourpage2.asp"
'goes to page 2.asp only if the form has sent a field value of "Yes"
%>

--




| Everything was set up through FP 2003, sending to Access DB, so i'd assume
| it's using VBScript.
|
| "Stefan B Rusynko" wrote:
|
| > Yes
| > - but not w/ the FP Default forms handler
| > If you are using a server side script language to send the form to the DB
| > - then it depends on the language you are using
| > --
| >
| > _____________________________________________
| > SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
| > "Warning - Using the F1 Key will not break anything!" (-;
| > To find the best Newsgroup for FrontPage support see:
| > http://www.net-sites.com/sitebuilder/newsgroups.asp
| > _____________________________________________
| >
| >
| > | currently i have a form that submits information entered by the user (we'll
| > | call it page1) once the information is entered it is sent to a database and
| > | the page redirects to its-self. that's all fine.
| > | What i want to know is if a certain field (dropdown box) is YES, can i still
| > | submit the information but redirect to another page, say page 2, fill the
| > | information in, then when submited redirect back to page 1
| > |
| > | i hope i've not confused anyone with the above, as i've usually got a habit
| > | of not explaining myself correctly.
| > |
| > | Any help would be appreciated.
| > |
| >
| >
| >
 
G

Guest

thanks but it didn't do the trick.
I tried adding it right at the very top of the page above the ASP code
already in the page and tried it below the asp code already in the page.

I should mention that the web Bot conformation page is set to redirect to
the same page, should i maybe take that out and add an else or something into
the code that you gave me.?

Looks like this is another book for me to buy. would it be a book on ASP.net
as i have seen these in the college book shop, or would it need to be a book
specifically on coding ASP pages.
Since we last chatted i have bought books on Access, SQL, Frontpage,
VBScript, and javascript, a bit heavy going but i'm learning.



Stefan B Rusynko said:
If you don't know if it is VBscript (ASP) you probably shouldn't attempt below
- the pages should have a .asp extension if you are running ASP

At the top of your .asp page add
<%
Request.Form("yourformfieldnamehere")
If Request.Form("yourformfieldnamehere")="Yes" Then response.redirect "yourpage2.asp"
'goes to page 2.asp only if the form has sent a field value of "Yes"
%>

--




| Everything was set up through FP 2003, sending to Access DB, so i'd assume
| it's using VBScript.
|
| "Stefan B Rusynko" wrote:
|
| > Yes
| > - but not w/ the FP Default forms handler
| > If you are using a server side script language to send the form to the DB
| > - then it depends on the language you are using
| > --
| >
| > _____________________________________________
| > SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
| > "Warning - Using the F1 Key will not break anything!" (-;
| > To find the best Newsgroup for FrontPage support see:
| > http://www.net-sites.com/sitebuilder/newsgroups.asp
| > _____________________________________________
| >
| >
| > | currently i have a form that submits information entered by the user (we'll
| > | call it page1) once the information is entered it is sent to a database and
| > | the page redirects to its-self. that's all fine.
| > | What i want to know is if a certain field (dropdown box) is YES, can i still
| > | submit the information but redirect to another page, say page 2, fill the
| > | information in, then when submited redirect back to page 1
| > |
| > | i hope i've not confused anyone with the above, as i've usually got a habit
| > | of not explaining myself correctly.
| > |
| > | Any help would be appreciated.
| > |
| >
| >
| >
 
S

Stefan B Rusynko

To see the value of the form field "yourformfieldnamehere" at the top of your page change it to:
<%
' delete below line after testing is done
Response.write Request.Form("yourformfieldnamehere")
' make sure you change "yourformfieldnamehere" to your actual form field name
If Request.Form("yourformfieldnamehere")="Yes" Then response.redirect "yourpage2.asp"
'goes to page 2.asp only if the form has sent a field value of "Yes"
%>

You won't see anything until you submit the form (to itself - the page w/ this code in it) and select the Yes drop down (which also
has to have a value of "Yes" in it)

PS
- this has nothing to do w/ ASP.net
--




| thanks but it didn't do the trick.
| I tried adding it right at the very top of the page above the ASP code
| already in the page and tried it below the asp code already in the page.
|
| I should mention that the web Bot conformation page is set to redirect to
| the same page, should i maybe take that out and add an else or something into
| the code that you gave me.?
|
| Looks like this is another book for me to buy. would it be a book on ASP.net
| as i have seen these in the college book shop, or would it need to be a book
| specifically on coding ASP pages.
| Since we last chatted i have bought books on Access, SQL, Frontpage,
| VBScript, and javascript, a bit heavy going but i'm learning.
|
|
|
| "Stefan B Rusynko" wrote:
|
| > If you don't know if it is VBscript (ASP) you probably shouldn't attempt below
| > - the pages should have a .asp extension if you are running ASP
| >
| > At the top of your .asp page add
| > <%
| > Request.Form("yourformfieldnamehere")
| > If Request.Form("yourformfieldnamehere")="Yes" Then response.redirect "yourpage2.asp"
| > 'goes to page 2.asp only if the form has sent a field value of "Yes"
| > %>
| >
| > --
| >
| > _____________________________________________
| > SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
| > "Warning - Using the F1 Key will not break anything!" (-;
| > To find the best Newsgroup for FrontPage support see:
| > http://www.net-sites.com/sitebuilder/newsgroups.asp
| > _____________________________________________
| >
| >
| > | Everything was set up through FP 2003, sending to Access DB, so i'd assume
| > | it's using VBScript.
| > |
| > | "Stefan B Rusynko" wrote:
| > |
| > | > Yes
| > | > - but not w/ the FP Default forms handler
| > | > If you are using a server side script language to send the form to the DB
| > | > - then it depends on the language you are using
| > | > --
| > | >
| > | > _____________________________________________
| > | > SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
| > | > "Warning - Using the F1 Key will not break anything!" (-;
| > | > To find the best Newsgroup for FrontPage support see:
| > | > http://www.net-sites.com/sitebuilder/newsgroups.asp
| > | > _____________________________________________
| > | >
| > | >
| > | > | currently i have a form that submits information entered by the user (we'll
| > | > | call it page1) once the information is entered it is sent to a database and
| > | > | the page redirects to its-self. that's all fine.
| > | > | What i want to know is if a certain field (dropdown box) is YES, can i still
| > | > | submit the information but redirect to another page, say page 2, fill the
| > | > | information in, then when submited redirect back to page 1
| > | > |
| > | > | i hope i've not confused anyone with the above, as i've usually got a habit
| > | > | of not explaining myself correctly.
| > | > |
| > | > | Any help would be appreciated.
| > | > |
| > | >
| > | >
| > | >
| >
| >
| >
 
G

Guest

It doesn't show the value at the top of the page or anywhere else, it tried
it 4 or 5 times just to be sure.

I have also Changed "yourformfieldnamehere" to "DriveReplaced" and
"yourpage2.asp" to "BL35P.asp"

<%
Response.write Request.Form("DriveReplaced")
If Request.Form("DriveReplaced")="Yes" Then response.redirect "BL35P.asp"
%>

There must be something else in the coding that's stoping it working.
BL35P.asp is in the same folder, it's not the page i will be directing to, i
just used it to test it.

Would you like me to post the FP coding, or the whole page code.?

Al....


Stefan B Rusynko said:
To see the value of the form field "yourformfieldnamehere" at the top of your page change it to:
<%
' delete below line after testing is done
Response.write Request.Form("yourformfieldnamehere")
' make sure you change "yourformfieldnamehere" to your actual form field name
If Request.Form("yourformfieldnamehere")="Yes" Then response.redirect "yourpage2.asp"
'goes to page 2.asp only if the form has sent a field value of "Yes"
%>

You won't see anything until you submit the form (to itself - the page w/ this code in it) and select the Yes drop down (which also
has to have a value of "Yes" in it)

PS
- this has nothing to do w/ ASP.net
--




| thanks but it didn't do the trick.
| I tried adding it right at the very top of the page above the ASP code
| already in the page and tried it below the asp code already in the page.
|
| I should mention that the web Bot conformation page is set to redirect to
| the same page, should i maybe take that out and add an else or something into
| the code that you gave me.?
|
| Looks like this is another book for me to buy. would it be a book on ASP.net
| as i have seen these in the college book shop, or would it need to be a book
| specifically on coding ASP pages.
| Since we last chatted i have bought books on Access, SQL, Frontpage,
| VBScript, and javascript, a bit heavy going but i'm learning.
|
|
|
| "Stefan B Rusynko" wrote:
|
| > If you don't know if it is VBscript (ASP) you probably shouldn't attempt below
| > - the pages should have a .asp extension if you are running ASP
| >
| > At the top of your .asp page add
| > <%
| > Request.Form("yourformfieldnamehere")
| > If Request.Form("yourformfieldnamehere")="Yes" Then response.redirect "yourpage2.asp"
| > 'goes to page 2.asp only if the form has sent a field value of "Yes"
| > %>
| >
| > --
| >
| > _____________________________________________
| > SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
| > "Warning - Using the F1 Key will not break anything!" (-;
| > To find the best Newsgroup for FrontPage support see:
| > http://www.net-sites.com/sitebuilder/newsgroups.asp
| > _____________________________________________
| >
| >
| > | Everything was set up through FP 2003, sending to Access DB, so i'd assume
| > | it's using VBScript.
| > |
| > | "Stefan B Rusynko" wrote:
| > |
| > | > Yes
| > | > - but not w/ the FP Default forms handler
| > | > If you are using a server side script language to send the form to the DB
| > | > - then it depends on the language you are using
| > | > --
| > | >
| > | > _____________________________________________
| > | > SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
| > | > "Warning - Using the F1 Key will not break anything!" (-;
| > | > To find the best Newsgroup for FrontPage support see:
| > | > http://www.net-sites.com/sitebuilder/newsgroups.asp
| > | > _____________________________________________
| > | >
| > | >
| > | > | currently i have a form that submits information entered by the user (we'll
| > | > | call it page1) once the information is entered it is sent to a database and
| > | > | the page redirects to its-self. that's all fine.
| > | > | What i want to know is if a certain field (dropdown box) is YES, can i still
| > | > | submit the information but redirect to another page, say page 2, fill the
| > | > | information in, then when submited redirect back to page 1
| > | > |
| > | > | i hope i've not confused anyone with the above, as i've usually got a habit
| > | > | of not explaining myself correctly.
| > | > |
| > | > | Any help would be appreciated.
| > | > |
| > | >
| > | >
| > | >
| >
| >
| >
 
S

Stefan B Rusynko

Then the form field is either
- not named "DriveReplaced"
- not sending or not set to send a value of "Yes" (w/o the quotes) from the dropdown option

Change
Response.write Request.Form("DriveReplaced")
to
Response.write "Drive Replaced value= " & Request.Form("DriveReplaced")

If you just see the below at the top of your page after sending the form it is a field value/name problem
Drive Replaced value=

Post a URL to your form test page online

PS
To see all your real form field names and values being passed (after the form is submitted) paste the below at the very top of the
page

<%
For Each Item In Request.Form
fieldName = Item
fieldValue = Request.Form(Item)
Response.Write fieldName & " = " & fieldValue & "<br>"
Next
%>

--




| It doesn't show the value at the top of the page or anywhere else, it tried
| it 4 or 5 times just to be sure.
|
| I have also Changed "yourformfieldnamehere" to "DriveReplaced" and
| "yourpage2.asp" to "BL35P.asp"
|
| <%
| Response.write Request.Form("DriveReplaced")
| If Request.Form("DriveReplaced")="Yes" Then response.redirect "BL35P.asp"
| %>
|
| There must be something else in the coding that's stoping it working.
| BL35P.asp is in the same folder, it's not the page i will be directing to, i
| just used it to test it.
|
| Would you like me to post the FP coding, or the whole page code.?
|
| Al....
|
|
| "Stefan B Rusynko" wrote:
|
| > To see the value of the form field "yourformfieldnamehere" at the top of your page change it to:
| > <%
| > ' delete below line after testing is done
| > Response.write Request.Form("yourformfieldnamehere")
| > ' make sure you change "yourformfieldnamehere" to your actual form field name
| > If Request.Form("yourformfieldnamehere")="Yes" Then response.redirect "yourpage2.asp"
| > 'goes to page 2.asp only if the form has sent a field value of "Yes"
| > %>
| >
| > You won't see anything until you submit the form (to itself - the page w/ this code in it) and select the Yes drop down (which
also
| > has to have a value of "Yes" in it)
| >
| > PS
| > - this has nothing to do w/ ASP.net
| > --
| >
| > _____________________________________________
| > SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
| > "Warning - Using the F1 Key will not break anything!" (-;
| > To find the best Newsgroup for FrontPage support see:
| > http://www.net-sites.com/sitebuilder/newsgroups.asp
| > _____________________________________________
| >
| >
| > | thanks but it didn't do the trick.
| > | I tried adding it right at the very top of the page above the ASP code
| > | already in the page and tried it below the asp code already in the page.
| > |
| > | I should mention that the web Bot conformation page is set to redirect to
| > | the same page, should i maybe take that out and add an else or something into
| > | the code that you gave me.?
| > |
| > | Looks like this is another book for me to buy. would it be a book on ASP.net
| > | as i have seen these in the college book shop, or would it need to be a book
| > | specifically on coding ASP pages.
| > | Since we last chatted i have bought books on Access, SQL, Frontpage,
| > | VBScript, and javascript, a bit heavy going but i'm learning.
| > |
| > |
| > |
| > | "Stefan B Rusynko" wrote:
| > |
| > | > If you don't know if it is VBscript (ASP) you probably shouldn't attempt below
| > | > - the pages should have a .asp extension if you are running ASP
| > | >
| > | > At the top of your .asp page add
| > | > <%
| > | > Request.Form("yourformfieldnamehere")
| > | > If Request.Form("yourformfieldnamehere")="Yes" Then response.redirect "yourpage2.asp"
| > | > 'goes to page 2.asp only if the form has sent a field value of "Yes"
| > | > %>
| > | >
| > | > --
| > | >
| > | > _____________________________________________
| > | > SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
| > | > "Warning - Using the F1 Key will not break anything!" (-;
| > | > To find the best Newsgroup for FrontPage support see:
| > | > http://www.net-sites.com/sitebuilder/newsgroups.asp
| > | > _____________________________________________
| > | >
| > | >
| > | > | Everything was set up through FP 2003, sending to Access DB, so i'd assume
| > | > | it's using VBScript.
| > | > |
| > | > | "Stefan B Rusynko" wrote:
| > | > |
| > | > | > Yes
| > | > | > - but not w/ the FP Default forms handler
| > | > | > If you are using a server side script language to send the form to the DB
| > | > | > - then it depends on the language you are using
| > | > | > --
| > | > | >
| > | > | > _____________________________________________
| > | > | > SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
| > | > | > "Warning - Using the F1 Key will not break anything!" (-;
| > | > | > To find the best Newsgroup for FrontPage support see:
| > | > | > http://www.net-sites.com/sitebuilder/newsgroups.asp
| > | > | > _____________________________________________
| > | > | >
| > | > | >
| > | > | > | currently i have a form that submits information entered by the user (we'll
| > | > | > | call it page1) once the information is entered it is sent to a database and
| > | > | > | the page redirects to its-self. that's all fine.
| > | > | > | What i want to know is if a certain field (dropdown box) is YES, can i still
| > | > | > | submit the information but redirect to another page, say page 2, fill the
| > | > | > | information in, then when submited redirect back to page 1
| > | > | > |
| > | > | > | i hope i've not confused anyone with the above, as i've usually got a habit
| > | > | > | of not explaining myself correctly.
| > | > | > |
| > | > | > | Any help would be appreciated.
| > | > | > |
| > | > | >
| > | > | >
| > | > | >
| > | >
| > | >
| > | >
| >
| >
| >
 
G

Guest

I added

<%
For Each Item In Request.Form
fieldName = Item
fieldValue = Request.Form(Item)
Response.Write fieldName & " = " & fieldValue & "<br>"
Next
%>

and still no response.

The field values are being passed as they are being inserted into the
database, also if i dont specify a conformation page, then FP default
conformation shows the field names and values inserted.

In the code written by FP it shows
arFormValues0(1) = Request("DriveReplaced")

the default value for this field is no

and the code you asked me to enter does write on the page and it is shown as
Drive Replaced value=
as you stated.

I'm sure it's something stupid (ME)


Al....



Stefan B Rusynko said:
Then the form field is either
- not named "DriveReplaced"
- not sending or not set to send a value of "Yes" (w/o the quotes) from the dropdown option

Change
Response.write Request.Form("DriveReplaced")
to
Response.write "Drive Replaced value= " & Request.Form("DriveReplaced")

If you just see the below at the top of your page after sending the form it is a field value/name problem
Drive Replaced value=

Post a URL to your form test page online

PS
To see all your real form field names and values being passed (after the form is submitted) paste the below at the very top of the
page

<%
For Each Item In Request.Form
fieldName = Item
fieldValue = Request.Form(Item)
Response.Write fieldName & " = " & fieldValue & "<br>"
Next
%>

--




| It doesn't show the value at the top of the page or anywhere else, it tried
| it 4 or 5 times just to be sure.
|
| I have also Changed "yourformfieldnamehere" to "DriveReplaced" and
| "yourpage2.asp" to "BL35P.asp"
|
| <%
| Response.write Request.Form("DriveReplaced")
| If Request.Form("DriveReplaced")="Yes" Then response.redirect "BL35P.asp"
| %>
|
| There must be something else in the coding that's stoping it working.
| BL35P.asp is in the same folder, it's not the page i will be directing to, i
| just used it to test it.
|
| Would you like me to post the FP coding, or the whole page code.?
|
| Al....
|
|
| "Stefan B Rusynko" wrote:
|
| > To see the value of the form field "yourformfieldnamehere" at the top of your page change it to:
| > <%
| > ' delete below line after testing is done
| > Response.write Request.Form("yourformfieldnamehere")
| > ' make sure you change "yourformfieldnamehere" to your actual form field name
| > If Request.Form("yourformfieldnamehere")="Yes" Then response.redirect "yourpage2.asp"
| > 'goes to page 2.asp only if the form has sent a field value of "Yes"
| > %>
| >
| > You won't see anything until you submit the form (to itself - the page w/ this code in it) and select the Yes drop down (which
also
| > has to have a value of "Yes" in it)
| >
| > PS
| > - this has nothing to do w/ ASP.net
| > --
| >
| > _____________________________________________
| > SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
| > "Warning - Using the F1 Key will not break anything!" (-;
| > To find the best Newsgroup for FrontPage support see:
| > http://www.net-sites.com/sitebuilder/newsgroups.asp
| > _____________________________________________
| >
| >
| > | thanks but it didn't do the trick.
| > | I tried adding it right at the very top of the page above the ASP code
| > | already in the page and tried it below the asp code already in the page.
| > |
| > | I should mention that the web Bot conformation page is set to redirect to
| > | the same page, should i maybe take that out and add an else or something into
| > | the code that you gave me.?
| > |
| > | Looks like this is another book for me to buy. would it be a book on ASP.net
| > | as i have seen these in the college book shop, or would it need to be a book
| > | specifically on coding ASP pages.
| > | Since we last chatted i have bought books on Access, SQL, Frontpage,
| > | VBScript, and javascript, a bit heavy going but i'm learning.
| > |
| > |
| > |
| > | "Stefan B Rusynko" wrote:
| > |
| > | > If you don't know if it is VBscript (ASP) you probably shouldn't attempt below
| > | > - the pages should have a .asp extension if you are running ASP
| > | >
| > | > At the top of your .asp page add
| > | > <%
| > | > Request.Form("yourformfieldnamehere")
| > | > If Request.Form("yourformfieldnamehere")="Yes" Then response.redirect "yourpage2.asp"
| > | > 'goes to page 2.asp only if the form has sent a field value of "Yes"
| > | > %>
| > | >
| > | > --
| > | >
| > | > _____________________________________________
| > | > SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
| > | > "Warning - Using the F1 Key will not break anything!" (-;
| > | > To find the best Newsgroup for FrontPage support see:
| > | > http://www.net-sites.com/sitebuilder/newsgroups.asp
| > | > _____________________________________________
| > | >
| > | >
| > | > | Everything was set up through FP 2003, sending to Access DB, so i'd assume
| > | > | it's using VBScript.
| > | > |
| > | > | "Stefan B Rusynko" wrote:
| > | > |
| > | > | > Yes
| > | > | > - but not w/ the FP Default forms handler
| > | > | > If you are using a server side script language to send the form to the DB
| > | > | > - then it depends on the language you are using
| > | > | > --
| > | > | >
| > | > | > _____________________________________________
| > | > | > SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
| > | > | > "Warning - Using the F1 Key will not break anything!" (-;
| > | > | > To find the best Newsgroup for FrontPage support see:
| > | > | > http://www.net-sites.com/sitebuilder/newsgroups.asp
| > | > | > _____________________________________________
| > | > | >
| > | > | >
| > | > | > | currently i have a form that submits information entered by the user (we'll
| > | > | > | call it page1) once the information is entered it is sent to a database and
| > | > | > | the page redirects to its-self. that's all fine.
| > | > | > | What i want to know is if a certain field (dropdown box) is YES, can i still
| > | > | > | submit the information but redirect to another page, say page 2, fill the
| > | > | > | information in, then when submited redirect back to page 1
| > | > | > |
| > | > | > | i hope i've not confused anyone with the above, as i've usually got a habit
| > | > | > | of not explaining myself correctly.
| > | > | > |
| > | > | > | Any help would be appreciated.
| > | > | > |
| > | > | >
| > | > | >
| > | > | >
| > | >
| > | >
| > | >
| >
| >
| >
 
S

Stefan B Rusynko

Post a URL to your form test page online

The For Each Next code will only work on the page the form is submitted to for processing (action)

--




|I added
|
| <%
| For Each Item In Request.Form
| fieldName = Item
| fieldValue = Request.Form(Item)
| Response.Write fieldName & " = " & fieldValue & "<br>"
| Next
| %>
|
| and still no response.
|
| The field values are being passed as they are being inserted into the
| database, also if i dont specify a conformation page, then FP default
| conformation shows the field names and values inserted.
|
| In the code written by FP it shows
| arFormValues0(1) = Request("DriveReplaced")
|
| the default value for this field is no
|
| and the code you asked me to enter does write on the page and it is shown as
| Drive Replaced value=
| as you stated.
|
| I'm sure it's something stupid (ME)
|
|
| Al....
|
|
|
| "Stefan B Rusynko" wrote:
|
| > Then the form field is either
| > - not named "DriveReplaced"
| > - not sending or not set to send a value of "Yes" (w/o the quotes) from the dropdown option
| >
| > Change
| > Response.write Request.Form("DriveReplaced")
| > to
| > Response.write "Drive Replaced value= " & Request.Form("DriveReplaced")
| >
| > If you just see the below at the top of your page after sending the form it is a field value/name problem
| > Drive Replaced value=
| >
| > Post a URL to your form test page online
| >
| > PS
| > To see all your real form field names and values being passed (after the form is submitted) paste the below at the very top of
the
| > page
| >
| > <%
| > For Each Item In Request.Form
| > fieldName = Item
| > fieldValue = Request.Form(Item)
| > Response.Write fieldName & " = " & fieldValue & "<br>"
| > Next
| > %>
| >
| > --
| >
| > _____________________________________________
| > SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
| > "Warning - Using the F1 Key will not break anything!" (-;
| > To find the best Newsgroup for FrontPage support see:
| > http://www.net-sites.com/sitebuilder/newsgroups.asp
| > _____________________________________________
| >
| >
| > | It doesn't show the value at the top of the page or anywhere else, it tried
| > | it 4 or 5 times just to be sure.
| > |
| > | I have also Changed "yourformfieldnamehere" to "DriveReplaced" and
| > | "yourpage2.asp" to "BL35P.asp"
| > |
| > | <%
| > | Response.write Request.Form("DriveReplaced")
| > | If Request.Form("DriveReplaced")="Yes" Then response.redirect "BL35P.asp"
| > | %>
| > |
| > | There must be something else in the coding that's stoping it working.
| > | BL35P.asp is in the same folder, it's not the page i will be directing to, i
| > | just used it to test it.
| > |
| > | Would you like me to post the FP coding, or the whole page code.?
| > |
| > | Al....
| > |
| > |
| > | "Stefan B Rusynko" wrote:
| > |
| > | > To see the value of the form field "yourformfieldnamehere" at the top of your page change it to:
| > | > <%
| > | > ' delete below line after testing is done
| > | > Response.write Request.Form("yourformfieldnamehere")
| > | > ' make sure you change "yourformfieldnamehere" to your actual form field name
| > | > If Request.Form("yourformfieldnamehere")="Yes" Then response.redirect "yourpage2.asp"
| > | > 'goes to page 2.asp only if the form has sent a field value of "Yes"
| > | > %>
| > | >
| > | > You won't see anything until you submit the form (to itself - the page w/ this code in it) and select the Yes drop down
(which
| > also
| > | > has to have a value of "Yes" in it)
| > | >
| > | > PS
| > | > - this has nothing to do w/ ASP.net
| > | > --
| > | >
| > | > _____________________________________________
| > | > SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
| > | > "Warning - Using the F1 Key will not break anything!" (-;
| > | > To find the best Newsgroup for FrontPage support see:
| > | > http://www.net-sites.com/sitebuilder/newsgroups.asp
| > | > _____________________________________________
| > | >
| > | >
| > | > | thanks but it didn't do the trick.
| > | > | I tried adding it right at the very top of the page above the ASP code
| > | > | already in the page and tried it below the asp code already in the page.
| > | > |
| > | > | I should mention that the web Bot conformation page is set to redirect to
| > | > | the same page, should i maybe take that out and add an else or something into
| > | > | the code that you gave me.?
| > | > |
| > | > | Looks like this is another book for me to buy. would it be a book on ASP.net
| > | > | as i have seen these in the college book shop, or would it need to be a book
| > | > | specifically on coding ASP pages.
| > | > | Since we last chatted i have bought books on Access, SQL, Frontpage,
| > | > | VBScript, and javascript, a bit heavy going but i'm learning.
| > | > |
| > | > |
| > | > |
| > | > | "Stefan B Rusynko" wrote:
| > | > |
| > | > | > If you don't know if it is VBscript (ASP) you probably shouldn't attempt below
| > | > | > - the pages should have a .asp extension if you are running ASP
| > | > | >
| > | > | > At the top of your .asp page add
| > | > | > <%
| > | > | > Request.Form("yourformfieldnamehere")
| > | > | > If Request.Form("yourformfieldnamehere")="Yes" Then response.redirect "yourpage2.asp"
| > | > | > 'goes to page 2.asp only if the form has sent a field value of "Yes"
| > | > | > %>
| > | > | >
| > | > | > --
| > | > | >
| > | > | > _____________________________________________
| > | > | > SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
| > | > | > "Warning - Using the F1 Key will not break anything!" (-;
| > | > | > To find the best Newsgroup for FrontPage support see:
| > | > | > http://www.net-sites.com/sitebuilder/newsgroups.asp
| > | > | > _____________________________________________
| > | > | >
| > | > | >
| > | > | > | Everything was set up through FP 2003, sending to Access DB, so i'd assume
| > | > | > | it's using VBScript.
| > | > | > |
| > | > | > | "Stefan B Rusynko" wrote:
| > | > | > |
| > | > | > | > Yes
| > | > | > | > - but not w/ the FP Default forms handler
| > | > | > | > If you are using a server side script language to send the form to the DB
| > | > | > | > - then it depends on the language you are using
| > | > | > | > --
| > | > | > | >
| > | > | > | > _____________________________________________
| > | > | > | > SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
| > | > | > | > "Warning - Using the F1 Key will not break anything!" (-;
| > | > | > | > To find the best Newsgroup for FrontPage support see:
| > | > | > | > http://www.net-sites.com/sitebuilder/newsgroups.asp
| > | > | > | > _____________________________________________
| > | > | > | >
| > | > | > | >
| > | > | > | > | currently i have a form that submits information entered by the user (we'll
| > | > | > | > | call it page1) once the information is entered it is sent to a database and
| > | > | > | > | the page redirects to its-self. that's all fine.
| > | > | > | > | What i want to know is if a certain field (dropdown box) is YES, can i still
| > | > | > | > | submit the information but redirect to another page, say page 2, fill the
| > | > | > | > | information in, then when submited redirect back to page 1
| > | > | > | > |
| > | > | > | > | i hope i've not confused anyone with the above, as i've usually got a habit
| > | > | > | > | of not explaining myself correctly.
| > | > | > | > |
| > | > | > | > | Any help would be appreciated.
| > | > | > | > |
| > | > | > | >
| > | > | > | >
| > | > | > | >
| > | > | >
| > | > | >
| > | > | >
| > | >
| > | >
| > | >
| >
| >
| >
 
G

Guest

I'm not sure what you mean by "Post a URL to your form test page online"

Do you mean create a confirmation page that shows all the posted results?
would that not be the same as the default one that FP does?


Stefan B Rusynko said:
Post a URL to your form test page online

The For Each Next code will only work on the page the form is submitted to for processing (action)

--




|I added
|
| <%
| For Each Item In Request.Form
| fieldName = Item
| fieldValue = Request.Form(Item)
| Response.Write fieldName & " = " & fieldValue & "<br>"
| Next
| %>
|
| and still no response.
|
| The field values are being passed as they are being inserted into the
| database, also if i dont specify a conformation page, then FP default
| conformation shows the field names and values inserted.
|
| In the code written by FP it shows
| arFormValues0(1) = Request("DriveReplaced")
|
| the default value for this field is no
|
| and the code you asked me to enter does write on the page and it is shown as
| Drive Replaced value=
| as you stated.
|
| I'm sure it's something stupid (ME)
|
|
| Al....
|
|
|
| "Stefan B Rusynko" wrote:
|
| > Then the form field is either
| > - not named "DriveReplaced"
| > - not sending or not set to send a value of "Yes" (w/o the quotes) from the dropdown option
| >
| > Change
| > Response.write Request.Form("DriveReplaced")
| > to
| > Response.write "Drive Replaced value= " & Request.Form("DriveReplaced")
| >
| > If you just see the below at the top of your page after sending the form it is a field value/name problem
| > Drive Replaced value=
| >
| > Post a URL to your form test page online
| >
| > PS
| > To see all your real form field names and values being passed (after the form is submitted) paste the below at the very top of
the
| > page
| >
| > <%
| > For Each Item In Request.Form
| > fieldName = Item
| > fieldValue = Request.Form(Item)
| > Response.Write fieldName & " = " & fieldValue & "<br>"
| > Next
| > %>
| >
| > --
| >
| > _____________________________________________
| > SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
| > "Warning - Using the F1 Key will not break anything!" (-;
| > To find the best Newsgroup for FrontPage support see:
| > http://www.net-sites.com/sitebuilder/newsgroups.asp
| > _____________________________________________
| >
| >
| > | It doesn't show the value at the top of the page or anywhere else, it tried
| > | it 4 or 5 times just to be sure.
| > |
| > | I have also Changed "yourformfieldnamehere" to "DriveReplaced" and
| > | "yourpage2.asp" to "BL35P.asp"
| > |
| > | <%
| > | Response.write Request.Form("DriveReplaced")
| > | If Request.Form("DriveReplaced")="Yes" Then response.redirect "BL35P.asp"
| > | %>
| > |
| > | There must be something else in the coding that's stoping it working.
| > | BL35P.asp is in the same folder, it's not the page i will be directing to, i
| > | just used it to test it.
| > |
| > | Would you like me to post the FP coding, or the whole page code.?
| > |
| > | Al....
| > |
| > |
| > | "Stefan B Rusynko" wrote:
| > |
| > | > To see the value of the form field "yourformfieldnamehere" at the top of your page change it to:
| > | > <%
| > | > ' delete below line after testing is done
| > | > Response.write Request.Form("yourformfieldnamehere")
| > | > ' make sure you change "yourformfieldnamehere" to your actual form field name
| > | > If Request.Form("yourformfieldnamehere")="Yes" Then response.redirect "yourpage2.asp"
| > | > 'goes to page 2.asp only if the form has sent a field value of "Yes"
| > | > %>
| > | >
| > | > You won't see anything until you submit the form (to itself - the page w/ this code in it) and select the Yes drop down
(which
| > also
| > | > has to have a value of "Yes" in it)
| > | >
| > | > PS
| > | > - this has nothing to do w/ ASP.net
| > | > --
| > | >
| > | > _____________________________________________
| > | > SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
| > | > "Warning - Using the F1 Key will not break anything!" (-;
| > | > To find the best Newsgroup for FrontPage support see:
| > | > http://www.net-sites.com/sitebuilder/newsgroups.asp
| > | > _____________________________________________
| > | >
| > | >
| > | > | thanks but it didn't do the trick.
| > | > | I tried adding it right at the very top of the page above the ASP code
| > | > | already in the page and tried it below the asp code already in the page.
| > | > |
| > | > | I should mention that the web Bot conformation page is set to redirect to
| > | > | the same page, should i maybe take that out and add an else or something into
| > | > | the code that you gave me.?
| > | > |
| > | > | Looks like this is another book for me to buy. would it be a book on ASP.net
| > | > | as i have seen these in the college book shop, or would it need to be a book
| > | > | specifically on coding ASP pages.
| > | > | Since we last chatted i have bought books on Access, SQL, Frontpage,
| > | > | VBScript, and javascript, a bit heavy going but i'm learning.
| > | > |
| > | > |
| > | > |
| > | > | "Stefan B Rusynko" wrote:
| > | > |
| > | > | > If you don't know if it is VBscript (ASP) you probably shouldn't attempt below
| > | > | > - the pages should have a .asp extension if you are running ASP
| > | > | >
| > | > | > At the top of your .asp page add
| > | > | > <%
| > | > | > Request.Form("yourformfieldnamehere")
| > | > | > If Request.Form("yourformfieldnamehere")="Yes" Then response.redirect "yourpage2.asp"
| > | > | > 'goes to page 2.asp only if the form has sent a field value of "Yes"
| > | > | > %>
| > | > | >
| > | > | > --
| > | > | >
| > | > | > _____________________________________________
| > | > | > SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
| > | > | > "Warning - Using the F1 Key will not break anything!" (-;
| > | > | > To find the best Newsgroup for FrontPage support see:
| > | > | > http://www.net-sites.com/sitebuilder/newsgroups.asp
| > | > | > _____________________________________________
| > | > | >
| > | > | >
| > | > | > | Everything was set up through FP 2003, sending to Access DB, so i'd assume
| > | > | > | it's using VBScript.
| > | > | > |
| > | > | > | "Stefan B Rusynko" wrote:
| > | > | > |
| > | > | > | > Yes
| > | > | > | > - but not w/ the FP Default forms handler
| > | > | > | > If you are using a server side script language to send the form to the DB
| > | > | > | > - then it depends on the language you are using
| > | > | > | > --
| > | > | > | >
| > | > | > | > _____________________________________________
| > | > | > | > SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
| > | > | > | > "Warning - Using the F1 Key will not break anything!" (-;
| > | > | > | > To find the best Newsgroup for FrontPage support see:
| > | > | > | > http://www.net-sites.com/sitebuilder/newsgroups.asp
| > | > | > | > _____________________________________________
| > | > | > | >
| > | > | > | >
| > | > | > | > | currently i have a form that submits information entered by the user (we'll
| > | > | > | > | call it page1) once the information is entered it is sent to a database and
| > | > | > | > | the page redirects to its-self. that's all fine.
| > | > | > | > | What i want to know is if a certain field (dropdown box) is YES, can i still
| > | > | > | > | submit the information but redirect to another page, say page 2, fill the
| > | > | > | > | information in, then when submited redirect back to page 1
| > | > | > | > |
| > | > | > | > | i hope i've not confused anyone with the above, as i've usually got a habit
| > | > | > | > | of not explaining myself correctly.
| > | > | > | > |
| > | > | > | > | Any help would be appreciated.
| > | > | > | > |
| > | > | > | >
| > | > | > | >
| > | > | > | >
| > | > | >
| > | > | >
| > | > | >
| > | >
| > | >
| > | >
| >
| >
| >
 
S

Stefan B Rusynko

Post the location of the form page on the web
- the online site URL of where you have your form page that you are testing
(if it is published to a hosted online server someplace)

--




| I'm not sure what you mean by "Post a URL to your form test page online"
|
| Do you mean create a confirmation page that shows all the posted results?
| would that not be the same as the default one that FP does?
|
|
| "Stefan B Rusynko" wrote:
|
| > Post a URL to your form test page online
| >
| > The For Each Next code will only work on the page the form is submitted to for processing (action)
| >
| > --
| >
| > _____________________________________________
| > SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
| > "Warning - Using the F1 Key will not break anything!" (-;
| > To find the best Newsgroup for FrontPage support see:
| > http://www.net-sites.com/sitebuilder/newsgroups.asp
| > _____________________________________________
| >
| >
| > |I added
| > |
| > | <%
| > | For Each Item In Request.Form
| > | fieldName = Item
| > | fieldValue = Request.Form(Item)
| > | Response.Write fieldName & " = " & fieldValue & "<br>"
| > | Next
| > | %>
| > |
| > | and still no response.
| > |
| > | The field values are being passed as they are being inserted into the
| > | database, also if i dont specify a conformation page, then FP default
| > | conformation shows the field names and values inserted.
| > |
| > | In the code written by FP it shows
| > | arFormValues0(1) = Request("DriveReplaced")
| > |
| > | the default value for this field is no
| > |
| > | and the code you asked me to enter does write on the page and it is shown as
| > | Drive Replaced value=
| > | as you stated.
| > |
| > | I'm sure it's something stupid (ME)
| > |
| > |
| > | Al....
| > |
| > |
| > |
| > | "Stefan B Rusynko" wrote:
| > |
| > | > Then the form field is either
| > | > - not named "DriveReplaced"
| > | > - not sending or not set to send a value of "Yes" (w/o the quotes) from the dropdown option
| > | >
| > | > Change
| > | > Response.write Request.Form("DriveReplaced")
| > | > to
| > | > Response.write "Drive Replaced value= " & Request.Form("DriveReplaced")
| > | >
| > | > If you just see the below at the top of your page after sending the form it is a field value/name problem
| > | > Drive Replaced value=
| > | >
| > | > Post a URL to your form test page online
| > | >
| > | > PS
| > | > To see all your real form field names and values being passed (after the form is submitted) paste the below at the very top
of
| > the
| > | > page
| > | >
| > | > <%
| > | > For Each Item In Request.Form
| > | > fieldName = Item
| > | > fieldValue = Request.Form(Item)
| > | > Response.Write fieldName & " = " & fieldValue & "<br>"
| > | > Next
| > | > %>
| > | >
| > | > --
| > | >
| > | > _____________________________________________
| > | > SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
| > | > "Warning - Using the F1 Key will not break anything!" (-;
| > | > To find the best Newsgroup for FrontPage support see:
| > | > http://www.net-sites.com/sitebuilder/newsgroups.asp
| > | > _____________________________________________
| > | >
| > | >
| > | > | It doesn't show the value at the top of the page or anywhere else, it tried
| > | > | it 4 or 5 times just to be sure.
| > | > |
| > | > | I have also Changed "yourformfieldnamehere" to "DriveReplaced" and
| > | > | "yourpage2.asp" to "BL35P.asp"
| > | > |
| > | > | <%
| > | > | Response.write Request.Form("DriveReplaced")
| > | > | If Request.Form("DriveReplaced")="Yes" Then response.redirect "BL35P.asp"
| > | > | %>
| > | > |
| > | > | There must be something else in the coding that's stoping it working.
| > | > | BL35P.asp is in the same folder, it's not the page i will be directing to, i
| > | > | just used it to test it.
| > | > |
| > | > | Would you like me to post the FP coding, or the whole page code.?
| > | > |
| > | > | Al....
| > | > |
| > | > |
| > | > | "Stefan B Rusynko" wrote:
| > | > |
| > | > | > To see the value of the form field "yourformfieldnamehere" at the top of your page change it to:
| > | > | > <%
| > | > | > ' delete below line after testing is done
| > | > | > Response.write Request.Form("yourformfieldnamehere")
| > | > | > ' make sure you change "yourformfieldnamehere" to your actual form field name
| > | > | > If Request.Form("yourformfieldnamehere")="Yes" Then response.redirect "yourpage2.asp"
| > | > | > 'goes to page 2.asp only if the form has sent a field value of "Yes"
| > | > | > %>
| > | > | >
| > | > | > You won't see anything until you submit the form (to itself - the page w/ this code in it) and select the Yes drop down
| > (which
| > | > also
| > | > | > has to have a value of "Yes" in it)
| > | > | >
| > | > | > PS
| > | > | > - this has nothing to do w/ ASP.net
| > | > | > --
| > | > | >
| > | > | > _____________________________________________
| > | > | > SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
| > | > | > "Warning - Using the F1 Key will not break anything!" (-;
| > | > | > To find the best Newsgroup for FrontPage support see:
| > | > | > http://www.net-sites.com/sitebuilder/newsgroups.asp
| > | > | > _____________________________________________
| > | > | >
| > | > | >
| > | > | > | thanks but it didn't do the trick.
| > | > | > | I tried adding it right at the very top of the page above the ASP code
| > | > | > | already in the page and tried it below the asp code already in the page.
| > | > | > |
| > | > | > | I should mention that the web Bot conformation page is set to redirect to
| > | > | > | the same page, should i maybe take that out and add an else or something into
| > | > | > | the code that you gave me.?
| > | > | > |
| > | > | > | Looks like this is another book for me to buy. would it be a book on ASP.net
| > | > | > | as i have seen these in the college book shop, or would it need to be a book
| > | > | > | specifically on coding ASP pages.
| > | > | > | Since we last chatted i have bought books on Access, SQL, Frontpage,
| > | > | > | VBScript, and javascript, a bit heavy going but i'm learning.
| > | > | > |
| > | > | > |
| > | > | > |
| > | > | > | "Stefan B Rusynko" wrote:
| > | > | > |
| > | > | > | > If you don't know if it is VBscript (ASP) you probably shouldn't attempt below
| > | > | > | > - the pages should have a .asp extension if you are running ASP
| > | > | > | >
| > | > | > | > At the top of your .asp page add
| > | > | > | > <%
| > | > | > | > Request.Form("yourformfieldnamehere")
| > | > | > | > If Request.Form("yourformfieldnamehere")="Yes" Then response.redirect "yourpage2.asp"
| > | > | > | > 'goes to page 2.asp only if the form has sent a field value of "Yes"
| > | > | > | > %>
| > | > | > | >
| > | > | > | > --
| > | > | > | >
| > | > | > | > _____________________________________________
| > | > | > | > SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
| > | > | > | > "Warning - Using the F1 Key will not break anything!" (-;
| > | > | > | > To find the best Newsgroup for FrontPage support see:
| > | > | > | > http://www.net-sites.com/sitebuilder/newsgroups.asp
| > | > | > | > _____________________________________________
| > | > | > | >
| > | > | > | >
| > | > | > | > | Everything was set up through FP 2003, sending to Access DB, so i'd assume
| > | > | > | > | it's using VBScript.
| > | > | > | > |
| > | > | > | > | "Stefan B Rusynko" wrote:
| > | > | > | > |
| > | > | > | > | > Yes
| > | > | > | > | > - but not w/ the FP Default forms handler
| > | > | > | > | > If you are using a server side script language to send the form to the DB
| > | > | > | > | > - then it depends on the language you are using
| > | > | > | > | > --
| > | > | > | > | >
| > | > | > | > | > _____________________________________________
| > | > | > | > | > SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
| > | > | > | > | > "Warning - Using the F1 Key will not break anything!" (-;
| > | > | > | > | > To find the best Newsgroup for FrontPage support see:
| > | > | > | > | > http://www.net-sites.com/sitebuilder/newsgroups.asp
| > | > | > | > | > _____________________________________________
| > | > | > | > | >
| > | > | > | > | >
| > | > | > | > | > | > | currently i have a form that submits information entered by the user (we'll
| > | > | > | > | > | call it page1) once the information is entered it is sent to a database and
| > | > | > | > | > | the page redirects to its-self. that's all fine.
| > | > | > | > | > | What i want to know is if a certain field (dropdown box) is YES, can i still
| > | > | > | > | > | submit the information but redirect to another page, say page 2, fill the
| > | > | > | > | > | information in, then when submited redirect back to page 1
| > | > | > | > | > |
| > | > | > | > | > | i hope i've not confused anyone with the above, as i've usually got a habit
| > | > | > | > | > | of not explaining myself correctly.
| > | > | > | > | > |
| > | > | > | > | > | Any help would be appreciated.
| > | > | > | > | > |
| > | > | > | > | >
| > | > | > | > | >
| > | > | > | > | >
| > | > | > | >
| > | > | > | >
| > | > | > | >
| > | > | >
| > | > | >
| > | > | >
| > | >
| > | >
| > | >
| >
| >
| >
 
G

Guest

If you mean you want me to post on here where the location of the website is
i'm afraid it would be pointless as it's on a private network in or work, at
present i'm testing things out on my PC using the hosting feature that you
get on XP professional therfore the best i could do would be to post or email
the page to you.

I don't make things easy do i?

Sorry...


Al....

Stefan B Rusynko said:
Post the location of the form page on the web
- the online site URL of where you have your form page that you are testing
(if it is published to a hosted online server someplace)

--




| I'm not sure what you mean by "Post a URL to your form test page online"
|
| Do you mean create a confirmation page that shows all the posted results?
| would that not be the same as the default one that FP does?
|
|
| "Stefan B Rusynko" wrote:
|
| > Post a URL to your form test page online
| >
| > The For Each Next code will only work on the page the form is submitted to for processing (action)
| >
| > --
| >
| > _____________________________________________
| > SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
| > "Warning - Using the F1 Key will not break anything!" (-;
| > To find the best Newsgroup for FrontPage support see:
| > http://www.net-sites.com/sitebuilder/newsgroups.asp
| > _____________________________________________
| >
| >
| > |I added
| > |
| > | <%
| > | For Each Item In Request.Form
| > | fieldName = Item
| > | fieldValue = Request.Form(Item)
| > | Response.Write fieldName & " = " & fieldValue & "<br>"
| > | Next
| > | %>
| > |
| > | and still no response.
| > |
| > | The field values are being passed as they are being inserted into the
| > | database, also if i dont specify a conformation page, then FP default
| > | conformation shows the field names and values inserted.
| > |
| > | In the code written by FP it shows
| > | arFormValues0(1) = Request("DriveReplaced")
| > |
| > | the default value for this field is no
| > |
| > | and the code you asked me to enter does write on the page and it is shown as
| > | Drive Replaced value=
| > | as you stated.
| > |
| > | I'm sure it's something stupid (ME)
| > |
| > |
| > | Al....
| > |
| > |
| > |
| > | "Stefan B Rusynko" wrote:
| > |
| > | > Then the form field is either
| > | > - not named "DriveReplaced"
| > | > - not sending or not set to send a value of "Yes" (w/o the quotes) from the dropdown option
| > | >
| > | > Change
| > | > Response.write Request.Form("DriveReplaced")
| > | > to
| > | > Response.write "Drive Replaced value= " & Request.Form("DriveReplaced")
| > | >
| > | > If you just see the below at the top of your page after sending the form it is a field value/name problem
| > | > Drive Replaced value=
| > | >
| > | > Post a URL to your form test page online
| > | >
| > | > PS
| > | > To see all your real form field names and values being passed (after the form is submitted) paste the below at the very top
of
| > the
| > | > page
| > | >
| > | > <%
| > | > For Each Item In Request.Form
| > | > fieldName = Item
| > | > fieldValue = Request.Form(Item)
| > | > Response.Write fieldName & " = " & fieldValue & "<br>"
| > | > Next
| > | > %>
| > | >
| > | > --
| > | >
| > | > _____________________________________________
| > | > SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
| > | > "Warning - Using the F1 Key will not break anything!" (-;
| > | > To find the best Newsgroup for FrontPage support see:
| > | > http://www.net-sites.com/sitebuilder/newsgroups.asp
| > | > _____________________________________________
| > | >
| > | >
| > | > | It doesn't show the value at the top of the page or anywhere else, it tried
| > | > | it 4 or 5 times just to be sure.
| > | > |
| > | > | I have also Changed "yourformfieldnamehere" to "DriveReplaced" and
| > | > | "yourpage2.asp" to "BL35P.asp"
| > | > |
| > | > | <%
| > | > | Response.write Request.Form("DriveReplaced")
| > | > | If Request.Form("DriveReplaced")="Yes" Then response.redirect "BL35P.asp"
| > | > | %>
| > | > |
| > | > | There must be something else in the coding that's stoping it working.
| > | > | BL35P.asp is in the same folder, it's not the page i will be directing to, i
| > | > | just used it to test it.
| > | > |
| > | > | Would you like me to post the FP coding, or the whole page code.?
| > | > |
| > | > | Al....
| > | > |
| > | > |
| > | > | "Stefan B Rusynko" wrote:
| > | > |
| > | > | > To see the value of the form field "yourformfieldnamehere" at the top of your page change it to:
| > | > | > <%
| > | > | > ' delete below line after testing is done
| > | > | > Response.write Request.Form("yourformfieldnamehere")
| > | > | > ' make sure you change "yourformfieldnamehere" to your actual form field name
| > | > | > If Request.Form("yourformfieldnamehere")="Yes" Then response.redirect "yourpage2.asp"
| > | > | > 'goes to page 2.asp only if the form has sent a field value of "Yes"
| > | > | > %>
| > | > | >
| > | > | > You won't see anything until you submit the form (to itself - the page w/ this code in it) and select the Yes drop down
| > (which
| > | > also
| > | > | > has to have a value of "Yes" in it)
| > | > | >
| > | > | > PS
| > | > | > - this has nothing to do w/ ASP.net
| > | > | > --
| > | > | >
| > | > | > _____________________________________________
| > | > | > SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
| > | > | > "Warning - Using the F1 Key will not break anything!" (-;
| > | > | > To find the best Newsgroup for FrontPage support see:
| > | > | > http://www.net-sites.com/sitebuilder/newsgroups.asp
| > | > | > _____________________________________________
| > | > | >
| > | > | >
| > | > | > | thanks but it didn't do the trick.
| > | > | > | I tried adding it right at the very top of the page above the ASP code
| > | > | > | already in the page and tried it below the asp code already in the page.
| > | > | > |
| > | > | > | I should mention that the web Bot conformation page is set to redirect to
| > | > | > | the same page, should i maybe take that out and add an else or something into
| > | > | > | the code that you gave me.?
| > | > | > |
| > | > | > | Looks like this is another book for me to buy. would it be a book on ASP.net
| > | > | > | as i have seen these in the college book shop, or would it need to be a book
| > | > | > | specifically on coding ASP pages.
| > | > | > | Since we last chatted i have bought books on Access, SQL, Frontpage,
| > | > | > | VBScript, and javascript, a bit heavy going but i'm learning.
| > | > | > |
| > | > | > |
| > | > | > |
| > | > | > | "Stefan B Rusynko" wrote:
| > | > | > |
| > | > | > | > If you don't know if it is VBscript (ASP) you probably shouldn't attempt below
| > | > | > | > - the pages should have a .asp extension if you are running ASP
| > | > | > | >
| > | > | > | > At the top of your .asp page add
| > | > | > | > <%
| > | > | > | > Request.Form("yourformfieldnamehere")
| > | > | > | > If Request.Form("yourformfieldnamehere")="Yes" Then response.redirect "yourpage2.asp"
| > | > | > | > 'goes to page 2.asp only if the form has sent a field value of "Yes"
| > | > | > | > %>
| > | > | > | >
| > | > | > | > --
| > | > | > | >
| > | > | > | > _____________________________________________
| > | > | > | > SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
| > | > | > | > "Warning - Using the F1 Key will not break anything!" (-;
| > | > | > | > To find the best Newsgroup for FrontPage support see:
| > | > | > | > http://www.net-sites.com/sitebuilder/newsgroups.asp
| > | > | > | > _____________________________________________
| > | > | > | >
| > | > | > | >
| > | > | > | > | Everything was set up through FP 2003, sending to Access DB, so i'd assume
| > | > | > | > | it's using VBScript.
| > | > | > | > |
| > | > | > | > | "Stefan B Rusynko" wrote:
| > | > | > | > |
| > | > | > | > | > Yes
| > | > | > | > | > - but not w/ the FP Default forms handler
| > | > | > | > | > If you are using a server side script language to send the form to the DB
| > | > | > | > | > - then it depends on the language you are using
| > | > | > | > | > --
| > | > | > | > | >
| > | > | > | > | > _____________________________________________
| > | > | > | > | > SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
| > | > | > | > | > "Warning - Using the F1 Key will not break anything!" (-;
| > | > | > | > | > To find the best Newsgroup for FrontPage support see:
| > | > | > | > | > http://www.net-sites.com/sitebuilder/newsgroups.asp
| > | > | > | > | > _____________________________________________
| > | > | > | > | >
| > | > | > | > | >
| > | > | > | > | > | > | currently i have a form that submits information entered by the user (we'll
| > | > | > | > | > | call it page1) once the information is entered it is sent to a database and
| > | > | > | > | > | the page redirects to its-self. that's all fine.
| > | > | > | > | > | What i want to know is if a certain field (dropdown box) is YES, can i still
| > | > | > | > | > | submit the information but redirect to another page, say page 2, fill the
| > | > | > | > | > | information in, then when submited redirect back to page 1
| > | > | > | > | > |
| > | > | > | > | > | i hope i've not confused anyone with the above, as i've usually got a habit
| > | > | > | > | > | of not explaining myself correctly.
| > | > | > | > | > |
| > | > | > | > | > | Any help would be appreciated.
| > | > | > | > | > |
| > | > | > | > | >
| > | > | > | > | >
| > | > | > | > | >
| > | > | > | >
| > | > | > | >
| > | > | > | >
| > | > | >
| > | > | >
| > | > | >
| > | >
| > | >
| > | >
| >
| >
| >
 
S

Stefan B Rusynko

Just post a copy (code snippet) of your page code for the Form and the filename of the page running it

--




| If you mean you want me to post on here where the location of the website is
| i'm afraid it would be pointless as it's on a private network in or work, at
| present i'm testing things out on my PC using the hosting feature that you
| get on XP professional therfore the best i could do would be to post or email
| the page to you.
|
| I don't make things easy do i?
|
| Sorry...
|
|
| Al....
|
| "Stefan B Rusynko" wrote:
|
| > Post the location of the form page on the web
| > - the online site URL of where you have your form page that you are testing
| > (if it is published to a hosted online server someplace)
| >
| > --
| >
| > _____________________________________________
| > SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
| > "Warning - Using the F1 Key will not break anything!" (-;
| > To find the best Newsgroup for FrontPage support see:
| > http://www.net-sites.com/sitebuilder/newsgroups.asp
| > _____________________________________________
| >
| >
| > | I'm not sure what you mean by "Post a URL to your form test page online"
| > |
| > | Do you mean create a confirmation page that shows all the posted results?
| > | would that not be the same as the default one that FP does?
| > |
| > |
| > | "Stefan B Rusynko" wrote:
| > |
| > | > Post a URL to your form test page online
| > | >
| > | > The For Each Next code will only work on the page the form is submitted to for processing (action)
| > | >
| > | > --
| > | >
| > | > _____________________________________________
| > | > SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
| > | > "Warning - Using the F1 Key will not break anything!" (-;
| > | > To find the best Newsgroup for FrontPage support see:
| > | > http://www.net-sites.com/sitebuilder/newsgroups.asp
| > | > _____________________________________________
| > | >
| > | >
| > | > |I added
| > | > |
| > | > | <%
| > | > | For Each Item In Request.Form
| > | > | fieldName = Item
| > | > | fieldValue = Request.Form(Item)
| > | > | Response.Write fieldName & " = " & fieldValue & "<br>"
| > | > | Next
| > | > | %>
| > | > |
| > | > | and still no response.
| > | > |
| > | > | The field values are being passed as they are being inserted into the
| > | > | database, also if i dont specify a conformation page, then FP default
| > | > | conformation shows the field names and values inserted.
| > | > |
| > | > | In the code written by FP it shows
| > | > | arFormValues0(1) = Request("DriveReplaced")
| > | > |
| > | > | the default value for this field is no
| > | > |
| > | > | and the code you asked me to enter does write on the page and it is shown as
| > | > | Drive Replaced value=
| > | > | as you stated.
| > | > |
| > | > | I'm sure it's something stupid (ME)
| > | > |
| > | > |
| > | > | Al....
| > | > |
| > | > |
| > | > |
| > | > | "Stefan B Rusynko" wrote:
| > | > |
| > | > | > Then the form field is either
| > | > | > - not named "DriveReplaced"
| > | > | > - not sending or not set to send a value of "Yes" (w/o the quotes) from the dropdown option
| > | > | >
| > | > | > Change
| > | > | > Response.write Request.Form("DriveReplaced")
| > | > | > to
| > | > | > Response.write "Drive Replaced value= " & Request.Form("DriveReplaced")
| > | > | >
| > | > | > If you just see the below at the top of your page after sending the form it is a field value/name problem
| > | > | > Drive Replaced value=
| > | > | >
| > | > | > Post a URL to your form test page online
| > | > | >
| > | > | > PS
| > | > | > To see all your real form field names and values being passed (after the form is submitted) paste the below at the very
top
| > of
| > | > the
| > | > | > page
| > | > | >
| > | > | > <%
| > | > | > For Each Item In Request.Form
| > | > | > fieldName = Item
| > | > | > fieldValue = Request.Form(Item)
| > | > | > Response.Write fieldName & " = " & fieldValue & "<br>"
| > | > | > Next
| > | > | > %>
| > | > | >
| > | > | > --
| > | > | >
| > | > | > _____________________________________________
| > | > | > SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
| > | > | > "Warning - Using the F1 Key will not break anything!" (-;
| > | > | > To find the best Newsgroup for FrontPage support see:
| > | > | > http://www.net-sites.com/sitebuilder/newsgroups.asp
| > | > | > _____________________________________________
| > | > | >
| > | > | >
| > | > | > | It doesn't show the value at the top of the page or anywhere else, it tried
| > | > | > | it 4 or 5 times just to be sure.
| > | > | > |
| > | > | > | I have also Changed "yourformfieldnamehere" to "DriveReplaced" and
| > | > | > | "yourpage2.asp" to "BL35P.asp"
| > | > | > |
| > | > | > | <%
| > | > | > | Response.write Request.Form("DriveReplaced")
| > | > | > | If Request.Form("DriveReplaced")="Yes" Then response.redirect "BL35P.asp"
| > | > | > | %>
| > | > | > |
| > | > | > | There must be something else in the coding that's stoping it working.
| > | > | > | BL35P.asp is in the same folder, it's not the page i will be directing to, i
| > | > | > | just used it to test it.
| > | > | > |
| > | > | > | Would you like me to post the FP coding, or the whole page code.?
| > | > | > |
| > | > | > | Al....
| > | > | > |
| > | > | > |
| > | > | > | "Stefan B Rusynko" wrote:
| > | > | > |
| > | > | > | > To see the value of the form field "yourformfieldnamehere" at the top of your page change it to:
| > | > | > | > <%
| > | > | > | > ' delete below line after testing is done
| > | > | > | > Response.write Request.Form("yourformfieldnamehere")
| > | > | > | > ' make sure you change "yourformfieldnamehere" to your actual form field name
| > | > | > | > If Request.Form("yourformfieldnamehere")="Yes" Then response.redirect "yourpage2.asp"
| > | > | > | > 'goes to page 2.asp only if the form has sent a field value of "Yes"
| > | > | > | > %>
| > | > | > | >
| > | > | > | > You won't see anything until you submit the form (to itself - the page w/ this code in it) and select the Yes drop
down
| > | > (which
| > | > | > also
| > | > | > | > has to have a value of "Yes" in it)
| > | > | > | >
| > | > | > | > PS
| > | > | > | > - this has nothing to do w/ ASP.net
| > | > | > | > --
| > | > | > | >
| > | > | > | > _____________________________________________
| > | > | > | > SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
| > | > | > | > "Warning - Using the F1 Key will not break anything!" (-;
| > | > | > | > To find the best Newsgroup for FrontPage support see:
| > | > | > | > http://www.net-sites.com/sitebuilder/newsgroups.asp
| > | > | > | > _____________________________________________
| > | > | > | >
| > | > | > | >
| > | > | > | > | thanks but it didn't do the trick.
| > | > | > | > | I tried adding it right at the very top of the page above the ASP code
| > | > | > | > | already in the page and tried it below the asp code already in the page.
| > | > | > | > |
| > | > | > | > | I should mention that the web Bot conformation page is set to redirect to
| > | > | > | > | the same page, should i maybe take that out and add an else or something into
| > | > | > | > | the code that you gave me.?
| > | > | > | > |
| > | > | > | > | Looks like this is another book for me to buy. would it be a book on ASP.net
| > | > | > | > | as i have seen these in the college book shop, or would it need to be a book
| > | > | > | > | specifically on coding ASP pages.
| > | > | > | > | Since we last chatted i have bought books on Access, SQL, Frontpage,
| > | > | > | > | VBScript, and javascript, a bit heavy going but i'm learning.
| > | > | > | > |
| > | > | > | > |
| > | > | > | > |
| > | > | > | > | "Stefan B Rusynko" wrote:
| > | > | > | > |
| > | > | > | > | > If you don't know if it is VBscript (ASP) you probably shouldn't attempt below
| > | > | > | > | > - the pages should have a .asp extension if you are running ASP
| > | > | > | > | >
| > | > | > | > | > At the top of your .asp page add
| > | > | > | > | > <%
| > | > | > | > | > Request.Form("yourformfieldnamehere")
| > | > | > | > | > If Request.Form("yourformfieldnamehere")="Yes" Then response.redirect "yourpage2.asp"
| > | > | > | > | > 'goes to page 2.asp only if the form has sent a field value of "Yes"
| > | > | > | > | > %>
| > | > | > | > | >
| > | > | > | > | > --
| > | > | > | > | >
| > | > | > | > | > _____________________________________________
| > | > | > | > | > SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
| > | > | > | > | > "Warning - Using the F1 Key will not break anything!" (-;
| > | > | > | > | > To find the best Newsgroup for FrontPage support see:
| > | > | > | > | > http://www.net-sites.com/sitebuilder/newsgroups.asp
| > | > | > | > | > _____________________________________________
| > | > | > | > | >
| > | > | > | > | >
| > | > | > | > | > | > | Everything was set up through FP 2003, sending to Access DB, so i'd assume
| > | > | > | > | > | it's using VBScript.
| > | > | > | > | > |
| > | > | > | > | > | "Stefan B Rusynko" wrote:
| > | > | > | > | > |
| > | > | > | > | > | > Yes
| > | > | > | > | > | > - but not w/ the FP Default forms handler
| > | > | > | > | > | > If you are using a server side script language to send the form to the DB
| > | > | > | > | > | > - then it depends on the language you are using
| > | > | > | > | > | > --
| > | > | > | > | > | >
| > | > | > | > | > | > _____________________________________________
| > | > | > | > | > | > SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
| > | > | > | > | > | > "Warning - Using the F1 Key will not break anything!" (-;
| > | > | > | > | > | > To find the best Newsgroup for FrontPage support see:
| > | > | > | > | > | > http://www.net-sites.com/sitebuilder/newsgroups.asp
| > | > | > | > | > | > _____________________________________________
| > | > | > | > | > | >
| > | > | > | > | > | >
| > | > | > | > | > | > | > | > | currently i have a form that submits information entered by the user (we'll
| > | > | > | > | > | > | call it page1) once the information is entered it is sent to a database and
| > | > | > | > | > | > | the page redirects to its-self. that's all fine.
| > | > | > | > | > | > | What i want to know is if a certain field (dropdown box) is YES, can i still
| > | > | > | > | > | > | submit the information but redirect to another page, say page 2, fill the
| > | > | > | > | > | > | information in, then when submited redirect back to page 1
| > | > | > | > | > | > |
| > | > | > | > | > | > | i hope i've not confused anyone with the above, as i've usually got a habit
| > | > | > | > | > | > | of not explaining myself correctly.
| > | > | > | > | > | > |
| > | > | > | > | > | > | Any help would be appreciated.
| > | > | > | > | > | > |
| > | > | > | > | > | >
| > | > | > | > | > | >
| > | > | > | > | > | >
| > | > | > | > | >
| > | > | > | > | >
| > | > | > | > | >
| > | > | > | >
| > | > | > | >
| > | > | > | >
| > | > | >
| > | > | >
| > | > | >
| > | >
| > | >
| > | >
| >
| >
| >
 
G

Guest

Here's the code for the whole page.

<%
' 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 = 2057
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("Database_ConnectionString")
FP_DumpError strErrorUrl, "Cannot open database"

fp_rs.Open "Results", 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(6)
Dim arFormDBFields0(6)
Dim arFormValues0(6)

arFormFields0(0) = "DriveNo"
arFormDBFields0(0) = "DriveNo"
arFormValues0(0) = Request("DriveNo")
arFormFields0(1) = "DriveReplaced"
arFormDBFields0(1) = "DriveReplaced"
arFormValues0(1) = Request("DriveReplaced")
arFormFields0(2) = "TrayFault"
arFormDBFields0(2) = "TrayFault"
arFormValues0(2) = Request("TrayFault")
arFormFields0(3) = "UnlistedFault"
arFormDBFields0(3) = "UnlistedFault"
arFormValues0(3) = Request("UnlistedFault")
arFormFields0(4) = "TrayReplaced"
arFormDBFields0(4) = "TrayReplaced"
arFormValues0(4) = Request("TrayReplaced")
arFormFields0(5) = "DriveFault"
arFormDBFields0(5) = "DriveFault"
arFormValues0(5) = Request("DriveFault")

FP_SaveFormFields fp_rs, arFormFields0, arFormDBFields0

If Request.ServerVariables("REMOTE_HOST") <> "" Then
FP_SaveFieldToDB fp_rs, Request.ServerVariables("REMOTE_HOST"),
"Remote_computer_name"
End If
If Request.ServerVariables("HTTP_USER_AGENT") <> "" Then
FP_SaveFieldToDB fp_rs, Request.ServerVariables("HTTP_USER_AGENT"),
"Browser_type"
End If
FP_SaveFieldToDB fp_rs, Now, "Timestamp"
If Request.ServerVariables("REMOTE_USER") <> "" Then
FP_SaveFieldToDB fp_rs, Request.ServerVariables("REMOTE_USER"), "User_name"
End If

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 "Database.asp"

End If
End If

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

%>
<%
For Each Item In Request.Form
fieldName = Item
fieldValue = Request(Item)
Response.Write fieldName & " = " & fieldValue & "<br>"
Next
%>

<%
Response.write "Drive Replaced value = " & Request.Form("DriveReplaced")
If Request.Form("DriveReplaced") = "Yes" Then Response.Redirect "BL35P.asp"
%>

<html>

<head>
<meta http-equiv="Content-Language" content="en-gb">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>New Page 1</title>
</head>

<body>
<h1 align="center">Database<br>
</h1>
<form method="POST" action="--WEBBOT-SELF--" name="Database.asp">
<!--webbot bot="SaveDatabase" SuggestedExt="asp"
S-DataConnection="Database" S-RecordSource="Results"
U-Database-URL="../fpdb/Database.mdb" S-Builtin-Fields="REMOTE_HOST
HTTP_USER_AGENT Timestamp REMOTE_USER"
S-Builtin-DBFields="Remote_computer_name Browser_type Timestamp User_name"
S-Form-Fields="DriveNo DriveReplaced TrayFault UnlistedFault TrayReplaced
DriveFault" S-Form-DBFields="DriveNo DriveReplaced TrayFault UnlistedFault
TrayReplaced DriveFault" U-ASP-Include-Url="../_fpclass/fpdbform.inc"
startspan U-Confirmation-Url="Database.asp" --><input TYPE="hidden"
NAME="VTI-GROUP" VALUE="0"><!--#include
file="../_fpclass/fpdbform.inc"--><!--webbot bot="SaveDatabase" endspan
i-checksum="34604" -->
<p><font style="font-size: 16pt; font-weight: 700">Drive Number</font><br>
<font style="font-size: 16pt; font-weight: 700">
<input type="text" name="DriveNo" size="20" style="font-size: 16pt"
tabindex="1"></font></p>
<p><font style="font-size: 16pt; font-weight: 700">Drive
Fault
Drive Replaced</font><br>
<font style="font-size: 16pt; font-weight: 700">
<select size="1" name="DriveFault" style="font-size: 16pt" tabindex="2">
<option selected>No Fault Found</option>
<option>Imminent Failure</option>
<option>Failed To ID</option>
<option>Damaged Connector</option>
<option>Had Partition</option>
</select>
<select size="1" name="DriveReplaced" style="font-size: 16pt" tabindex="3">
<option selected>No</option>
<option>Yes</option>
</select> </font></p>
<p><font style="font-size: 16pt; font-weight: 700">Tray
Fault Tray
Replaced</font><br>
<font style="font-size: 16pt; font-weight: 700">
<select size="1" name="TrayFault" style="font-size: 16pt" tabindex="4">
<option selected>No Fault Found</option>
<option>Damaged Tray</option>
<option>Missing Handle</option>
<option>Broken Handle</option>
<option>Missing Antiship Rod</option>
</select>
<select size="1" name="TrayReplaced" style="font-size: 16pt" tabindex="5">
<option selected>No</option>
<option>Yes</option>
</select></font></p>
<p><font style="font-size: 16pt; font-weight: 700">Unlisted Fault</font><br>
<font style="font-size: 16pt; font-weight: 700">
<textarea rows="4" name="UnlistedFault" cols="51" style="font-size: 16pt;
font-weight:bold" tabindex="6"></textarea></font></p>
<p align="center"><input type="submit" value="Submit" name="B1"
style="font-size: 16pt">
<input type="reset" value="Reset" name="B2" style="font-size: 16pt"></p>
</form>



</body>



</html>



The file name is Database.asp

Stefan B Rusynko said:
Just post a copy (code snippet) of your page code for the Form and the filename of the page running it

--




| If you mean you want me to post on here where the location of the website is
| i'm afraid it would be pointless as it's on a private network in or work, at
| present i'm testing things out on my PC using the hosting feature that you
| get on XP professional therfore the best i could do would be to post or email
| the page to you.
|
| I don't make things easy do i?
|
| Sorry...
|
|
| Al....
|
| "Stefan B Rusynko" wrote:
|
| > Post the location of the form page on the web
| > - the online site URL of where you have your form page that you are testing
| > (if it is published to a hosted online server someplace)
| >
| > --
| >
| > _____________________________________________
| > SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
| > "Warning - Using the F1 Key will not break anything!" (-;
| > To find the best Newsgroup for FrontPage support see:
| > http://www.net-sites.com/sitebuilder/newsgroups.asp
| > _____________________________________________
| >
| >
| > | I'm not sure what you mean by "Post a URL to your form test page online"
| > |
| > | Do you mean create a confirmation page that shows all the posted results?
| > | would that not be the same as the default one that FP does?
| > |
| > |
| > | "Stefan B Rusynko" wrote:
| > |
| > | > Post a URL to your form test page online
| > | >
| > | > The For Each Next code will only work on the page the form is submitted to for processing (action)
| > | >
| > | > --
| > | >
| > | > _____________________________________________
| > | > SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
| > | > "Warning - Using the F1 Key will not break anything!" (-;
| > | > To find the best Newsgroup for FrontPage support see:
| > | > http://www.net-sites.com/sitebuilder/newsgroups.asp
| > | > _____________________________________________
| > | >
| > | >
| > | > |I added
| > | > |
| > | > | <%
| > | > | For Each Item In Request.Form
| > | > | fieldName = Item
| > | > | fieldValue = Request.Form(Item)
| > | > | Response.Write fieldName & " = " & fieldValue & "<br>"
| > | > | Next
| > | > | %>
| > | > |
| > | > | and still no response.
| > | > |
| > | > | The field values are being passed as they are being inserted into the
| > | > | database, also if i dont specify a conformation page, then FP default
| > | > | conformation shows the field names and values inserted.
| > | > |
| > | > | In the code written by FP it shows
| > | > | arFormValues0(1) = Request("DriveReplaced")
| > | > |
| > | > | the default value for this field is no
| > | > |
| > | > | and the code you asked me to enter does write on the page and it is shown as
| > | > | Drive Replaced value=
| > | > | as you stated.
| > | > |
| > | > | I'm sure it's something stupid (ME)
| > | > |
| > | > |
| > | > | Al....
| > | > |
| > | > |
| > | > |
| > | > | "Stefan B Rusynko" wrote:
| > | > |
| > | > | > Then the form field is either
| > | > | > - not named "DriveReplaced"
| > | > | > - not sending or not set to send a value of "Yes" (w/o the quotes) from the dropdown option
| > | > | >
| > | > | > Change
| > | > | > Response.write Request.Form("DriveReplaced")
| > | > | > to
| > | > | > Response.write "Drive Replaced value= " & Request.Form("DriveReplaced")
| > | > | >
| > | > | > If you just see the below at the top of your page after sending the form it is a field value/name problem
| > | > | > Drive Replaced value=
| > | > | >
| > | > | > Post a URL to your form test page online
| > | > | >
| > | > | > PS
| > | > | > To see all your real form field names and values being passed (after the form is submitted) paste the below at the very
top
| > of
| > | > the
| > | > | > page
| > | > | >
| > | > | > <%
| > | > | > For Each Item In Request.Form
| > | > | > fieldName = Item
| > | > | > fieldValue = Request.Form(Item)
| > | > | > Response.Write fieldName & " = " & fieldValue & "<br>"
| > | > | > Next
| > | > | > %>
| > | > | >
| > | > | > --
| > | > | >
| > | > | > _____________________________________________
| > | > | > SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
| > | > | > "Warning - Using the F1 Key will not break anything!" (-;
| > | > | > To find the best Newsgroup for FrontPage support see:
| > | > | > http://www.net-sites.com/sitebuilder/newsgroups.asp
| > | > | > _____________________________________________
| > | > | >
| > | > | >
| > | > | > | It doesn't show the value at the top of the page or anywhere else, it tried
| > | > | > | it 4 or 5 times just to be sure.
| > | > | > |
| > | > | > | I have also Changed "yourformfieldnamehere" to "DriveReplaced" and
| > | > | > | "yourpage2.asp" to "BL35P.asp"
| > | > | > |
| > | > | > | <%
| > | > | > | Response.write Request.Form("DriveReplaced")
| > | > | > | If Request.Form("DriveReplaced")="Yes" Then response.redirect "BL35P.asp"
| > | > | > | %>
| > | > | > |
| > | > | > | There must be something else in the coding that's stoping it working.
| > | > | > | BL35P.asp is in the same folder, it's not the page i will be directing to, i
| > | > | > | just used it to test it.
| > | > | > |
| > | > | > | Would you like me to post the FP coding, or the whole page code.?
| > | > | > |
| > | > | > | Al....
| > | > | > |
| > | > | > |
| > | > | > | "Stefan B Rusynko" wrote:
| > | > | > |
| > | > | > | > To see the value of the form field "yourformfieldnamehere" at the top of your page change it to:
| > | > | > | > <%
| > | > | > | > ' delete below line after testing is done
| > | > | > | > Response.write Request.Form("yourformfieldnamehere")
| > | > | > | > ' make sure you change "yourformfieldnamehere" to your actual form field name
| > | > | > | > If Request.Form("yourformfieldnamehere")="Yes" Then response.redirect "yourpage2.asp"
| > | > | > | > 'goes to page 2.asp only if the form has sent a field value of "Yes"
| > | > | > | > %>
| > | > | > | >
| > | > | > | > You won't see anything until you submit the form (to itself - the page w/ this code in it) and select the Yes drop
down
| > | > (which
| > | > | > also
| > | > | > | > has to have a value of "Yes" in it)
| > | > | > | >
| > | > | > | > PS
| > | > | > | > - this has nothing to do w/ ASP.net
| > | > | > | > --
| > | > | > | >
| > | > | > | > _____________________________________________
| > | > | > | > SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
| > | > | > | > "Warning - Using the F1 Key will not break anything!" (-;
| > | > | > | > To find the best Newsgroup for FrontPage support see:
| > | > | > | > http://www.net-sites.com/sitebuilder/newsgroups.asp
| > | > | > | > _____________________________________________
| > | > | > | >
| > | > | > | >
| > | > | > | > | thanks but it didn't do the trick.
| > | > | > | > | I tried adding it right at the very top of the page above the ASP code
| > | > | > | > | already in the page and tried it below the asp code already in the page.
| > | > | > | > |
| > | > | > | > | I should mention that the web Bot conformation page is set to redirect to
| > | > | > | > | the same page, should i maybe take that out and add an else or something into
| > | > | > | > | the code that you gave me.?
| > | > | > | > |
| > | > | > | > | Looks like this is another book for me to buy. would it be a book on ASP.net
| > | > | > | > | as i have seen these in the college book shop, or would it need to be a book
| > | > | > | > | specifically on coding ASP pages.
| > | > | > | > | Since we last chatted i have bought books on Access, SQL, Frontpage,
| > | > | > | > | VBScript, and javascript, a bit heavy going but i'm learning.
| > | > | > | > |
| > | > | > | > |
| > | > | > | > |
| > | > | > | > | "Stefan B Rusynko" wrote:
| > | > | > | > |
| > | > | > | > | > If you don't know if it is VBscript (ASP) you probably shouldn't attempt below
| > | > | > | > | > - the pages should have a .asp extension if you are running ASP
| > | > | > | > | >
| > | > | > | > | > At the top of your .asp page add
| > | > | > | > | > <%
| > | > | > | > | > Request.Form("yourformfieldnamehere")
| > | > | > | > | > If Request.Form("yourformfieldnamehere")="Yes" Then response.redirect "yourpage2.asp"
| > | > | > | > | > 'goes to page 2.asp only if the form has sent a field value of "Yes"
| > | > | > | > | > %>
| > | > | > | > | >
| > | > | > | > | > --
| > | > | > | > | >
| > | > | > | > | > _____________________________________________
| > | > | > | > | > SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
| > | > | > | > | > "Warning - Using the F1 Key will not break anything!" (-;
| > | > | > | > | > To find the best Newsgroup for FrontPage support see:
| > | > | > | > | > http://www.net-sites.com/sitebuilder/newsgroups.asp
| > | > | > | > | > _____________________________________________
| > | > | > | > | >
| > | > | > | > | >
| > | > | > | > | > | > | Everything was set up through FP 2003, sending to Access DB, so i'd assume
| > | > | > | > | > | it's using VBScript.
| > | > | > | > | > |
| > | > | > | > | > | "Stefan B Rusynko" wrote:
| > | > | > | > | > |
| > | > | > | > | > | > Yes
| > | > | > | > | > | > - but not w/ the FP Default forms handler
| > | > | > | > | > | > If you are using a server side script language to send the form to the DB
| > | > | > | > | > | > - then it depends on the language you are using
| > | > | > | > | > | > --
| > | > | > | > | > | >
| > | > | > | > | > | > _____________________________________________
| > | > | > | > | > | > SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
| > | > | > | > | > | > "Warning - Using the F1 Key will not break anything!" (-;
| > | > | > | > | > | > To find the best Newsgroup for FrontPage support see:
| > | > | > | > | > | > http://www.net-sites.com/sitebuilder/newsgroups.asp
| > | > | > | > | > | > _____________________________________________
| > | > | > | > | > | >
| > | > | > | > | > | >
| > | > | > | > | > | > | > | > | currently i have a form that submits information entered by the user (we'll
| > | > | > | > | > | > | call it page1) once the information is entered it is sent to a database and
| > | > | > | > | > | > | the page redirects to its-self. that's all fine.
| > | > | > | > | > | > | What i want to know is if a certain field (dropdown box) is YES, can i still
| > | > | > | > | > | > | submit the information but redirect to another page, say page 2, fill the
| > | > | > | > | > | > | information in, then when submited redirect back to page 1
| > | > | > | > | > | > |
| > | > | > | > | > | > | i hope i've not confused anyone with the above, as i've usually got a habit
| > | > | > | > | > | > | of not explaining myself correctly.
| > | > | > | > | > | > |
| > | > | > | > | > | > | Any help would be appreciated.
| > | > | > | > | > | > |
| > | > | > | > | > | >
| > | > | > | > | > | >
| > | > | > | > | > | >
| > | > | > | > | >
| > | > | > | > | >
| > | > | > | > | >
| > | > | > | >
| > | > | > | >
| > | > | > | >
| > | > | >
| > | > | >
| > | > | >
| > | >
| > | >
| > | >
| >
| >
| >
 
S

Stefan B Rusynko

Move the code I gave you above
<%
' FP_ASP ASP Automatically generated by a FrontPage Component. Do not Edit.

That is the top of the page (isn't it)

And how do you expect the form to send a dropdown form field value if you don't set a value for it?

You have
<select size="1" name="DriveReplaced" style="font-size: 16pt" tabindex="3">
<option selected>No</option>
<option>Yes</option>
</select>

All that sends is a selected index # (0 or 1) and not a Yes or No

You should have (w/o your massive font):
<select size="1" name="DriveReplaced" tabindex="3">
<option selected value="No">No</option>
<option value="Yes">Yes</option>
</select>

PS
Same applies to all your other dropdowns which have no values assigned in Form Field Properties


IMHO
Stop work and start reading all the books you have




| Here's the code for the whole page.
|
| <%
| ' 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 = 2057
| 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("Database_ConnectionString")
| FP_DumpError strErrorUrl, "Cannot open database"
|
| fp_rs.Open "Results", 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(6)
| Dim arFormDBFields0(6)
| Dim arFormValues0(6)
|
| arFormFields0(0) = "DriveNo"
| arFormDBFields0(0) = "DriveNo"
| arFormValues0(0) = Request("DriveNo")
| arFormFields0(1) = "DriveReplaced"
| arFormDBFields0(1) = "DriveReplaced"
| arFormValues0(1) = Request("DriveReplaced")
| arFormFields0(2) = "TrayFault"
| arFormDBFields0(2) = "TrayFault"
| arFormValues0(2) = Request("TrayFault")
| arFormFields0(3) = "UnlistedFault"
| arFormDBFields0(3) = "UnlistedFault"
| arFormValues0(3) = Request("UnlistedFault")
| arFormFields0(4) = "TrayReplaced"
| arFormDBFields0(4) = "TrayReplaced"
| arFormValues0(4) = Request("TrayReplaced")
| arFormFields0(5) = "DriveFault"
| arFormDBFields0(5) = "DriveFault"
| arFormValues0(5) = Request("DriveFault")
|
| FP_SaveFormFields fp_rs, arFormFields0, arFormDBFields0
|
| If Request.ServerVariables("REMOTE_HOST") <> "" Then
| FP_SaveFieldToDB fp_rs, Request.ServerVariables("REMOTE_HOST"),
| "Remote_computer_name"
| End If
| If Request.ServerVariables("HTTP_USER_AGENT") <> "" Then
| FP_SaveFieldToDB fp_rs, Request.ServerVariables("HTTP_USER_AGENT"),
| "Browser_type"
| End If
| FP_SaveFieldToDB fp_rs, Now, "Timestamp"
| If Request.ServerVariables("REMOTE_USER") <> "" Then
| FP_SaveFieldToDB fp_rs, Request.ServerVariables("REMOTE_USER"), "User_name"
| End If
|
| 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 "Database.asp"
|
| End If
| End If
|
| Session.CodePage = Session("FP_OldCodePage")
| Session.LCID = Session("FP_OldLCID")
|
| %>
| <%
| For Each Item In Request.Form
| fieldName = Item
| fieldValue = Request(Item)
| Response.Write fieldName & " = " & fieldValue & "<br>"
| Next
| %>
|
| <%
| Response.write "Drive Replaced value = " & Request.Form("DriveReplaced")
| If Request.Form("DriveReplaced") = "Yes" Then Response.Redirect "BL35P.asp"
| %>
|
| <html>
|
| <head>
| <meta http-equiv="Content-Language" content="en-gb">
| <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
| <title>New Page 1</title>
| </head>
|
| <body>
| <h1 align="center">Database<br>
| </h1>
| <form method="POST" action="--WEBBOT-SELF--" name="Database.asp">
| <!--webbot bot="SaveDatabase" SuggestedExt="asp"
| S-DataConnection="Database" S-RecordSource="Results"
| U-Database-URL="../fpdb/Database.mdb" S-Builtin-Fields="REMOTE_HOST
| HTTP_USER_AGENT Timestamp REMOTE_USER"
| S-Builtin-DBFields="Remote_computer_name Browser_type Timestamp User_name"
| S-Form-Fields="DriveNo DriveReplaced TrayFault UnlistedFault TrayReplaced
| DriveFault" S-Form-DBFields="DriveNo DriveReplaced TrayFault UnlistedFault
| TrayReplaced DriveFault" U-ASP-Include-Url="../_fpclass/fpdbform.inc"
| startspan U-Confirmation-Url="Database.asp" --><input TYPE="hidden"
| NAME="VTI-GROUP" VALUE="0"><!--#include
| file="../_fpclass/fpdbform.inc"--><!--webbot bot="SaveDatabase" endspan
| i-checksum="34604" -->
| <p><font style="font-size: 16pt; font-weight: 700">Drive Number</font><br>
| <font style="font-size: 16pt; font-weight: 700">
| <input type="text" name="DriveNo" size="20" style="font-size: 16pt"
| tabindex="1"></font></p>
| <p><font style="font-size: 16pt; font-weight: 700">Drive
| Fault
| Drive Replaced</font><br>
| <font style="font-size: 16pt; font-weight: 700">
| <select size="1" name="DriveFault" style="font-size: 16pt" tabindex="2">
| <option selected>No Fault Found</option>
| <option>Imminent Failure</option>
| <option>Failed To ID</option>
| <option>Damaged Connector</option>
| <option>Had Partition</option>
| </select>
| <select size="1" name="DriveReplaced" style="font-size: 16pt" tabindex="3">
| <option selected>No</option>
| <option>Yes</option>
| </select> </font></p>
| <p><font style="font-size: 16pt; font-weight: 700">Tray
| Fault Tray
| Replaced</font><br>
| <font style="font-size: 16pt; font-weight: 700">
| <select size="1" name="TrayFault" style="font-size: 16pt" tabindex="4">
| <option selected>No Fault Found</option>
| <option>Damaged Tray</option>
| <option>Missing Handle</option>
| <option>Broken Handle</option>
| <option>Missing Antiship Rod</option>
| </select>
| <select size="1" name="TrayReplaced" style="font-size: 16pt" tabindex="5">
| <option selected>No</option>
| <option>Yes</option>
| </select></font></p>
| <p><font style="font-size: 16pt; font-weight: 700">Unlisted Fault</font><br>
| <font style="font-size: 16pt; font-weight: 700">
| <textarea rows="4" name="UnlistedFault" cols="51" style="font-size: 16pt;
| font-weight:bold" tabindex="6"></textarea></font></p>
| <p align="center"><input type="submit" value="Submit" name="B1"
| style="font-size: 16pt">
| <input type="reset" value="Reset" name="B2" style="font-size: 16pt"></p>
| </form>
|
|
|
| </body>
|
|
|
| </html>
|
|
|
| The file name is Database.asp
|
| "Stefan B Rusynko" wrote:
|
| > Just post a copy (code snippet) of your page code for the Form and the filename of the page running it
| >
| > --
| >
| > _____________________________________________
| > SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
| > "Warning - Using the F1 Key will not break anything!" (-;
| > To find the best Newsgroup for FrontPage support see:
| > http://www.net-sites.com/sitebuilder/newsgroups.asp
| > _____________________________________________
| >
| >
| > | If you mean you want me to post on here where the location of the website is
| > | i'm afraid it would be pointless as it's on a private network in or work, at
| > | present i'm testing things out on my PC using the hosting feature that you
| > | get on XP professional therfore the best i could do would be to post or email
| > | the page to you.
| > |
| > | I don't make things easy do i?
| > |
| > | Sorry...
| > |
| > |
| > | Al....
| > |
| > | "Stefan B Rusynko" wrote:
| > |
| > | > Post the location of the form page on the web
| > | > - the online site URL of where you have your form page that you are testing
| > | > (if it is published to a hosted online server someplace)
| > | >
| > | > --
| > | >
| > | > _____________________________________________
| > | > SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
| > | > "Warning - Using the F1 Key will not break anything!" (-;
| > | > To find the best Newsgroup for FrontPage support see:
| > | > http://www.net-sites.com/sitebuilder/newsgroups.asp
| > | > _____________________________________________
| > | >
| > | >
| > | > | I'm not sure what you mean by "Post a URL to your form test page online"
| > | > |
| > | > | Do you mean create a confirmation page that shows all the posted results?
| > | > | would that not be the same as the default one that FP does?
| > | > |
| > | > |
| > | > | "Stefan B Rusynko" wrote:
| > | > |
| > | > | > Post a URL to your form test page online
| > | > | >
| > | > | > The For Each Next code will only work on the page the form is submitted to for processing (action)
| > | > | >
| > | > | > --
| > | > | >
| > | > | > _____________________________________________
| > | > | > SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
| > | > | > "Warning - Using the F1 Key will not break anything!" (-;
| > | > | > To find the best Newsgroup for FrontPage support see:
| > | > | > http://www.net-sites.com/sitebuilder/newsgroups.asp
| > | > | > _____________________________________________
| > | > | >
| > | > | >
| > | > | > |I added
| > | > | > |
| > | > | > | <%
| > | > | > | For Each Item In Request.Form
| > | > | > | fieldName = Item
| > | > | > | fieldValue = Request.Form(Item)
| > | > | > | Response.Write fieldName & " = " & fieldValue & "<br>"
| > | > | > | Next
| > | > | > | %>
| > | > | > |
| > | > | > | and still no response.
| > | > | > |
| > | > | > | The field values are being passed as they are being inserted into the
| > | > | > | database, also if i dont specify a conformation page, then FP default
| > | > | > | conformation shows the field names and values inserted.
| > | > | > |
| > | > | > | In the code written by FP it shows
| > | > | > | arFormValues0(1) = Request("DriveReplaced")
| > | > | > |
| > | > | > | the default value for this field is no
| > | > | > |
| > | > | > | and the code you asked me to enter does write on the page and it is shown as
| > | > | > | Drive Replaced value=
| > | > | > | as you stated.
| > | > | > |
| > | > | > | I'm sure it's something stupid (ME)
| > | > | > |
| > | > | > |
| > | > | > | Al....
| > | > | > |
| > | > | > |
| > | > | > |
| > | > | > | "Stefan B Rusynko" wrote:
| > | > | > |
| > | > | > | > Then the form field is either
| > | > | > | > - not named "DriveReplaced"
| > | > | > | > - not sending or not set to send a value of "Yes" (w/o the quotes) from the dropdown option
| > | > | > | >
| > | > | > | > Change
| > | > | > | > Response.write Request.Form("DriveReplaced")
| > | > | > | > to
| > | > | > | > Response.write "Drive Replaced value= " & Request.Form("DriveReplaced")
| > | > | > | >
| > | > | > | > If you just see the below at the top of your page after sending the form it is a field value/name problem
| > | > | > | > Drive Replaced value=
| > | > | > | >
| > | > | > | > Post a URL to your form test page online
| > | > | > | >
| > | > | > | > PS
| > | > | > | > To see all your real form field names and values being passed (after the form is submitted) paste the below at the
very
| > top
| > | > of
| > | > | > the
| > | > | > | > page
| > | > | > | >
| > | > | > | > <%
| > | > | > | > For Each Item In Request.Form
| > | > | > | > fieldName = Item
| > | > | > | > fieldValue = Request.Form(Item)
| > | > | > | > Response.Write fieldName & " = " & fieldValue & "<br>"
| > | > | > | > Next
| > | > | > | > %>
| > | > | > | >
| > | > | > | > --
| > | > | > | >
| > | > | > | > _____________________________________________
| > | > | > | > SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
| > | > | > | > "Warning - Using the F1 Key will not break anything!" (-;
| > | > | > | > To find the best Newsgroup for FrontPage support see:
| > | > | > | > http://www.net-sites.com/sitebuilder/newsgroups.asp
| > | > | > | > _____________________________________________
| > | > | > | >
| > | > | > | >
| > | > | > | > | It doesn't show the value at the top of the page or anywhere else, it tried
| > | > | > | > | it 4 or 5 times just to be sure.
| > | > | > | > |
| > | > | > | > | I have also Changed "yourformfieldnamehere" to "DriveReplaced" and
| > | > | > | > | "yourpage2.asp" to "BL35P.asp"
| > | > | > | > |
| > | > | > | > | <%
| > | > | > | > | Response.write Request.Form("DriveReplaced")
| > | > | > | > | If Request.Form("DriveReplaced")="Yes" Then response.redirect "BL35P.asp"
| > | > | > | > | %>
| > | > | > | > |
| > | > | > | > | There must be something else in the coding that's stoping it working.
| > | > | > | > | BL35P.asp is in the same folder, it's not the page i will be directing to, i
| > | > | > | > | just used it to test it.
| > | > | > | > |
| > | > | > | > | Would you like me to post the FP coding, or the whole page code.?
| > | > | > | > |
| > | > | > | > | Al....
| > | > | > | > |
| > | > | > | > |
| > | > | > | > | "Stefan B Rusynko" wrote:
| > | > | > | > |
| > | > | > | > | > To see the value of the form field "yourformfieldnamehere" at the top of your page change it to:
| > | > | > | > | > <%
| > | > | > | > | > ' delete below line after testing is done
| > | > | > | > | > Response.write Request.Form("yourformfieldnamehere")
| > | > | > | > | > ' make sure you change "yourformfieldnamehere" to your actual form field name
| > | > | > | > | > If Request.Form("yourformfieldnamehere")="Yes" Then response.redirect "yourpage2.asp"
| > | > | > | > | > 'goes to page 2.asp only if the form has sent a field value of "Yes"
| > | > | > | > | > %>
| > | > | > | > | >
| > | > | > | > | > You won't see anything until you submit the form (to itself - the page w/ this code in it) and select the Yes
drop
| > down
| > | > | > (which
| > | > | > | > also
| > | > | > | > | > has to have a value of "Yes" in it)
| > | > | > | > | >
| > | > | > | > | > PS
| > | > | > | > | > - this has nothing to do w/ ASP.net
| > | > | > | > | > --
| > | > | > | > | >
| > | > | > | > | > _____________________________________________
| > | > | > | > | > SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
| > | > | > | > | > "Warning - Using the F1 Key will not break anything!" (-;
| > | > | > | > | > To find the best Newsgroup for FrontPage support see:
| > | > | > | > | > http://www.net-sites.com/sitebuilder/newsgroups.asp
| > | > | > | > | > _____________________________________________
| > | > | > | > | >
| > | > | > | > | >
| > | > | > | > | > | > | thanks but it didn't do the trick.
| > | > | > | > | > | I tried adding it right at the very top of the page above the ASP code
| > | > | > | > | > | already in the page and tried it below the asp code already in the page.
| > | > | > | > | > |
| > | > | > | > | > | I should mention that the web Bot conformation page is set to redirect to
| > | > | > | > | > | the same page, should i maybe take that out and add an else or something into
| > | > | > | > | > | the code that you gave me.?
| > | > | > | > | > |
| > | > | > | > | > | Looks like this is another book for me to buy. would it be a book on ASP.net
| > | > | > | > | > | as i have seen these in the college book shop, or would it need to be a book
| > | > | > | > | > | specifically on coding ASP pages.
| > | > | > | > | > | Since we last chatted i have bought books on Access, SQL, Frontpage,
| > | > | > | > | > | VBScript, and javascript, a bit heavy going but i'm learning.
| > | > | > | > | > |
| > | > | > | > | > |
| > | > | > | > | > |
| > | > | > | > | > | "Stefan B Rusynko" wrote:
| > | > | > | > | > |
| > | > | > | > | > | > If you don't know if it is VBscript (ASP) you probably shouldn't attempt below
| > | > | > | > | > | > - the pages should have a .asp extension if you are running ASP
| > | > | > | > | > | >
| > | > | > | > | > | > At the top of your .asp page add
| > | > | > | > | > | > <%
| > | > | > | > | > | > Request.Form("yourformfieldnamehere")
| > | > | > | > | > | > If Request.Form("yourformfieldnamehere")="Yes" Then response.redirect "yourpage2.asp"
| > | > | > | > | > | > 'goes to page 2.asp only if the form has sent a field value of "Yes"
| > | > | > | > | > | > %>
| > | > | > | > | > | >
| > | > | > | > | > | > --
| > | > | > | > | > | >
| > | > | > | > | > | > _____________________________________________
| > | > | > | > | > | > SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
| > | > | > | > | > | > "Warning - Using the F1 Key will not break anything!" (-;
| > | > | > | > | > | > To find the best Newsgroup for FrontPage support see:
| > | > | > | > | > | > http://www.net-sites.com/sitebuilder/newsgroups.asp
| > | > | > | > | > | > _____________________________________________
| > | > | > | > | > | >
| > | > | > | > | > | >
| > | > | > | > | > | > | > | > | Everything was set up through FP 2003, sending to Access DB, so i'd assume
| > | > | > | > | > | > | it's using VBScript.
| > | > | > | > | > | > |
| > | > | > | > | > | > | "Stefan B Rusynko" wrote:
| > | > | > | > | > | > |
| > | > | > | > | > | > | > Yes
| > | > | > | > | > | > | > - but not w/ the FP Default forms handler
| > | > | > | > | > | > | > If you are using a server side script language to send the form to the DB
| > | > | > | > | > | > | > - then it depends on the language you are using
| > | > | > | > | > | > | > --
| > | > | > | > | > | > | >
| > | > | > | > | > | > | > _____________________________________________
| > | > | > | > | > | > | > SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
| > | > | > | > | > | > | > "Warning - Using the F1 Key will not break anything!" (-;
| > | > | > | > | > | > | > To find the best Newsgroup for FrontPage support see:
| > | > | > | > | > | > | > http://www.net-sites.com/sitebuilder/newsgroups.asp
| > | > | > | > | > | > | > _____________________________________________
| > | > | > | > | > | > | >
| > | > | > | > | > | > | >
| > | > | > | > | > | > | > | > | > | > | currently i have a form that submits information entered by the user (we'll
| > | > | > | > | > | > | > | call it page1) once the information is entered it is sent to a database and
| > | > | > | > | > | > | > | the page redirects to its-self. that's all fine.
| > | > | > | > | > | > | > | What i want to know is if a certain field (dropdown box) is YES, can i still
| > | > | > | > | > | > | > | submit the information but redirect to another page, say page 2, fill the
| > | > | > | > | > | > | > | information in, then when submited redirect back to page 1
| > | > | > | > | > | > | > |
| > | > | > | > | > | > | > | i hope i've not confused anyone with the above, as i've usually got a habit
| > | > | > | > | > | > | > | of not explaining myself correctly.
| > | > | > | > | > | > | > |
| > | > | > | > | > | > | > | Any help would be appreciated.
| > | > | > | > | > | > | > |
| > | > | > | > | > | > | >
| > | > | > | > | > | > | >
| > | > | > | > | > | > | >
| > | > | > | > | > | >
| > | > | > | > | > | >
| > | > | > | > | > | >
| > | > | > | > | >
| > | > | > | > | >
| > | > | > | > | >
| > | > | > | >
| > | > | > | >
| > | > | > | >
| > | > | >
| > | > | >
| > | > | >
| > | >
| > | >
| > | >
| >
| >
| >
 
G

Guest

Firstly i'm sorry if i've upset you, with what at first glance looks like my
stupidty, but was really my not explaining what i have and haven't tried.

The code was at the top of the page and as it didn't work i moved it, but
kept it above the head tag.

Secondly, as previously stated the values are passed as Yes, No and what
ever else i add, as they are entered into the database, i'm assuming that FP
adds extra code that says if you dont specify a Value then the dropdown
option is also the value.

Thirdly i tried what you suggested and there was no difference. As for
reading books I have looked at the books i have but there is no mention of
redirecting, which is why i asked you about ASP books earlier.

So looks like i'm still at square 1.

Here is something which may shed some light on the subject, in the WEBBOT
code there is
U-Confirmation-Url="Database.asp"
If i delete this then the default FP confirmation page comes up, if i chane
it then i redirect to the specified page.
Could this be overriding the redirect in the asp code, which is during this
experiment i never chnged from
Response.Redirect "Database.asp"
which sits at the bottom of the original code in the page.

I'll try to explain what i've done each time so that i don't upset you. Sorry.


Al....
 
S

Stefan B Rusynko

You don't upset me, but you need to start doing some studying of html & asp if you are going to attempt anything beyond the wizards

If your Access DB is set w/ a Yes/No (or true/false) field it will display as Yes for a value of 1 and No for a value of 0
(which just happens to be the select index values for your select field - so that is why it appears to work in Access)

If you want to preserve that, change your select to
<select size="1" name="DriveReplaced" tabindex="3">
<option selected value="0">No</option>
<option value="1">Yes</option>
</select>

But normally for a yes/no field you should be using radio buttons form fields as

<p>Drive Replaced?:
<input type="radio" value="0" checked name="DriveReplaced">No
<input type="radio" value="1" name="DriveReplaced">Yes</p>

And check for it using in the form page (which I was presuming was Database.asp)
<%
If CInt(Request.Form("DriveReplaced"))=1 Then Response.Redirect "yourpage2.asp"
'goes to page 2.asp only if the form has sent a field value of "Yes"
%>

But if you are using the FP DB wizards w/ a confirmation page that code belongs in Database.asp
- not in your form page
If it will work at all, since the FP SE / DBRW handle that page and by the time it is rendered the Data may have been sent to the
DB, processed by some other FP inc. page and the just displaying the Database.asp as a response redirect - so all form field data is
lost by that point)

If it does not work there, you will need to learn to hand code ASP and query your DB on the confirmation page Database.asp for the
value just written to DriveReplaced in the DB

--




| Firstly i'm sorry if i've upset you, with what at first glance looks like my
| stupidty, but was really my not explaining what i have and haven't tried.
|
| The code was at the top of the page and as it didn't work i moved it, but
| kept it above the head tag.
|
| Secondly, as previously stated the values are passed as Yes, No and what
| ever else i add, as they are entered into the database, i'm assuming that FP
| adds extra code that says if you dont specify a Value then the dropdown
| option is also the value.
|
| Thirdly i tried what you suggested and there was no difference. As for
| reading books I have looked at the books i have but there is no mention of
| redirecting, which is why i asked you about ASP books earlier.
|
| So looks like i'm still at square 1.
|
| Here is something which may shed some light on the subject, in the WEBBOT
| code there is
| U-Confirmation-Url="Database.asp"
| If i delete this then the default FP confirmation page comes up, if i chane
| it then i redirect to the specified page.
| Could this be overriding the redirect in the asp code, which is during this
| experiment i never chnged from
| Response.Redirect "Database.asp"
| which sits at the bottom of the original code in the page.
|
| I'll try to explain what i've done each time so that i don't upset you. Sorry.
|
|
| Al....
|
|
|
| "Stefan B Rusynko" wrote:
|
| > Move the code I gave you above
| > <%
| > ' FP_ASP ASP Automatically generated by a FrontPage Component. Do not Edit.
| >
| > That is the top of the page (isn't it)
| >
| > And how do you expect the form to send a dropdown form field value if you don't set a value for it?
| >
| > You have
| > <select size="1" name="DriveReplaced" style="font-size: 16pt" tabindex="3">
| > <option selected>No</option>
| > <option>Yes</option>
| > </select>
| >
| > All that sends is a selected index # (0 or 1) and not a Yes or No
| >
| > You should have (w/o your massive font):
| > <select size="1" name="DriveReplaced" tabindex="3">
| > <option selected value="No">No</option>
| > <option value="Yes">Yes</option>
| > </select>
| >
| > PS
| > Same applies to all your other dropdowns which have no values assigned in Form Field Properties
| >
| >
| > IMHO
| > Stop work and start reading all the books you have
| >
| > _____________________________________________
| > SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
| > "Warning - Using the F1 Key will not break anything!" (-;
| > To find the best Newsgroup for FrontPage support see:
| > http://www.net-sites.com/sitebuilder/newsgroups.asp
| > _____________________________________________
| >
| >
| > | Here's the code for the whole page.
| > |
| > | <%
| > | ' 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 = 2057
| > | 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("Database_ConnectionString")
| > | FP_DumpError strErrorUrl, "Cannot open database"
| > |
| > | fp_rs.Open "Results", 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(6)
| > | Dim arFormDBFields0(6)
| > | Dim arFormValues0(6)
| > |
| > | arFormFields0(0) = "DriveNo"
| > | arFormDBFields0(0) = "DriveNo"
| > | arFormValues0(0) = Request("DriveNo")
| > | arFormFields0(1) = "DriveReplaced"
| > | arFormDBFields0(1) = "DriveReplaced"
| > | arFormValues0(1) = Request("DriveReplaced")
| > | arFormFields0(2) = "TrayFault"
| > | arFormDBFields0(2) = "TrayFault"
| > | arFormValues0(2) = Request("TrayFault")
| > | arFormFields0(3) = "UnlistedFault"
| > | arFormDBFields0(3) = "UnlistedFault"
| > | arFormValues0(3) = Request("UnlistedFault")
| > | arFormFields0(4) = "TrayReplaced"
| > | arFormDBFields0(4) = "TrayReplaced"
| > | arFormValues0(4) = Request("TrayReplaced")
| > | arFormFields0(5) = "DriveFault"
| > | arFormDBFields0(5) = "DriveFault"
| > | arFormValues0(5) = Request("DriveFault")
| > |
| > | FP_SaveFormFields fp_rs, arFormFields0, arFormDBFields0
| > |
| > | If Request.ServerVariables("REMOTE_HOST") <> "" Then
| > | FP_SaveFieldToDB fp_rs, Request.ServerVariables("REMOTE_HOST"),
| > | "Remote_computer_name"
| > | End If
| > | If Request.ServerVariables("HTTP_USER_AGENT") <> "" Then
| > | FP_SaveFieldToDB fp_rs, Request.ServerVariables("HTTP_USER_AGENT"),
| > | "Browser_type"
| > | End If
| > | FP_SaveFieldToDB fp_rs, Now, "Timestamp"
| > | If Request.ServerVariables("REMOTE_USER") <> "" Then
| > | FP_SaveFieldToDB fp_rs, Request.ServerVariables("REMOTE_USER"), "User_name"
| > | End If
| > |
| > | 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 "Database.asp"
| > |
| > | End If
| > | End If
| > |
| > | Session.CodePage = Session("FP_OldCodePage")
| > | Session.LCID = Session("FP_OldLCID")
| > |
| > | %>
| > | <%
| > | For Each Item In Request.Form
| > | fieldName = Item
| > | fieldValue = Request(Item)
| > | Response.Write fieldName & " = " & fieldValue & "<br>"
| > | Next
| > | %>
| > |
| > | <%
| > | Response.write "Drive Replaced value = " & Request.Form("DriveReplaced")
| > | If Request.Form("DriveReplaced") = "Yes" Then Response.Redirect "BL35P.asp"
| > | %>
| > |
| > | <html>
| > |
| > | <head>
| > | <meta http-equiv="Content-Language" content="en-gb">
| > | <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
| > | <title>New Page 1</title>
| > | </head>
| > |
| > | <body>
| > | <h1 align="center">Database<br>
| > | </h1>
| > | <form method="POST" action="--WEBBOT-SELF--" name="Database.asp">
| > | <!--webbot bot="SaveDatabase" SuggestedExt="asp"
| > | S-DataConnection="Database" S-RecordSource="Results"
| > | U-Database-URL="../fpdb/Database.mdb" S-Builtin-Fields="REMOTE_HOST
| > | HTTP_USER_AGENT Timestamp REMOTE_USER"
| > | S-Builtin-DBFields="Remote_computer_name Browser_type Timestamp User_name"
| > | S-Form-Fields="DriveNo DriveReplaced TrayFault UnlistedFault TrayReplaced
| > | DriveFault" S-Form-DBFields="DriveNo DriveReplaced TrayFault UnlistedFault
| > | TrayReplaced DriveFault" U-ASP-Include-Url="../_fpclass/fpdbform.inc"
| > | startspan U-Confirmation-Url="Database.asp" --><input TYPE="hidden"
| > | NAME="VTI-GROUP" VALUE="0"><!--#include
| > | file="../_fpclass/fpdbform.inc"--><!--webbot bot="SaveDatabase" endspan
| > | i-checksum="34604" -->
| > | <p><font style="font-size: 16pt; font-weight: 700">Drive Number</font><br>
| > | <font style="font-size: 16pt; font-weight: 700">
| > | <input type="text" name="DriveNo" size="20" style="font-size: 16pt"
| > | tabindex="1"></font></p>
| > | <p><font style="font-size: 16pt; font-weight: 700">Drive
| > | Fault
| > | Drive Replaced</font><br>
| > | <font style="font-size: 16pt; font-weight: 700">
| > | <select size="1" name="DriveFault" style="font-size: 16pt" tabindex="2">
| > | <option selected>No Fault Found</option>
| > | <option>Imminent Failure</option>
| > | <option>Failed To ID</option>
| > | <option>Damaged Connector</option>
| > | <option>Had Partition</option>
| > | </select>
| > | <select size="1" name="DriveReplaced" style="font-size: 16pt" tabindex="3">
| > | <option selected>No</option>
| > | <option>Yes</option>
| > | </select> </font></p>
| > | <p><font style="font-size: 16pt; font-weight: 700">Tray
| > | Fault Tray
| > | Replaced</font><br>
| > | <font style="font-size: 16pt; font-weight: 700">
| > | <select size="1" name="TrayFault" style="font-size: 16pt" tabindex="4">
| > | <option selected>No Fault Found</option>
| > | <option>Damaged Tray</option>
| > | <option>Missing Handle</option>
| > | <option>Broken Handle</option>
| > | <option>Missing Antiship Rod</option>
| > | </select>
| > | <select size="1" name="TrayReplaced" style="font-size: 16pt" tabindex="5">
| > | <option selected>No</option>
| > | <option>Yes</option>
| > | </select></font></p>
| > | <p><font style="font-size: 16pt; font-weight: 700">Unlisted Fault</font><br>
| > | <font style="font-size: 16pt; font-weight: 700">
| > | <textarea rows="4" name="UnlistedFault" cols="51" style="font-size: 16pt;
| > | font-weight:bold" tabindex="6">
 
G

Guest

I pretty much understand what your stating, the reason i didn't use radio
buttons is that this page that i am using is not the current one, (the site
is one i use for testing any new code before adding it to the LIVE in use
site) as the actual dropdown box has an option with "Awaiting Spares", As for
the access database i never set that field up to only accept Yes or No as i
thought at somepoint i would be changing/altering it, as i have done.
Yes i did try the code on the Live site and no it still didn't work.

The other dropdown boxes (not yes or no) never had a value specified and
they also passed the information correctly, hence me thinking that if a value
is not specified, FP coding will set it up to send the Option name as the
value.

Yes i do agree that i have very little knowledge of asp programming, i will
buy a book or books when i find a suitable one, and when i have the cash flow.

thanks for your help anyway.


Al....

Stefan B Rusynko said:
You don't upset me, but you need to start doing some studying of html & asp if you are going to attempt anything beyond the wizards

If your Access DB is set w/ a Yes/No (or true/false) field it will display as Yes for a value of 1 and No for a value of 0
(which just happens to be the select index values for your select field - so that is why it appears to work in Access)

If you want to preserve that, change your select to
<select size="1" name="DriveReplaced" tabindex="3">
<option selected value="0">No</option>
<option value="1">Yes</option>
</select>

But normally for a yes/no field you should be using radio buttons form fields as

<p>Drive Replaced?:
<input type="radio" value="0" checked name="DriveReplaced">No
<input type="radio" value="1" name="DriveReplaced">Yes</p>

And check for it using in the form page (which I was presuming was Database.asp)
<%
If CInt(Request.Form("DriveReplaced"))=1 Then Response.Redirect "yourpage2.asp"
'goes to page 2.asp only if the form has sent a field value of "Yes"
%>

But if you are using the FP DB wizards w/ a confirmation page that code belongs in Database.asp
- not in your form page
If it will work at all, since the FP SE / DBRW handle that page and by the time it is rendered the Data may have been sent to the
DB, processed by some other FP inc. page and the just displaying the Database.asp as a response redirect - so all form field data is
lost by that point)

If it does not work there, you will need to learn to hand code ASP and query your DB on the confirmation page Database.asp for the
value just written to DriveReplaced in the DB

--




| Firstly i'm sorry if i've upset you, with what at first glance looks like my
| stupidty, but was really my not explaining what i have and haven't tried.
|
| The code was at the top of the page and as it didn't work i moved it, but
| kept it above the head tag.
|
| Secondly, as previously stated the values are passed as Yes, No and what
| ever else i add, as they are entered into the database, i'm assuming that FP
| adds extra code that says if you dont specify a Value then the dropdown
| option is also the value.
|
| Thirdly i tried what you suggested and there was no difference. As for
| reading books I have looked at the books i have but there is no mention of
| redirecting, which is why i asked you about ASP books earlier.
|
| So looks like i'm still at square 1.
|
| Here is something which may shed some light on the subject, in the WEBBOT
| code there is
| U-Confirmation-Url="Database.asp"
| If i delete this then the default FP confirmation page comes up, if i chane
| it then i redirect to the specified page.
| Could this be overriding the redirect in the asp code, which is during this
| experiment i never chnged from
| Response.Redirect "Database.asp"
| which sits at the bottom of the original code in the page.
|
| I'll try to explain what i've done each time so that i don't upset you. Sorry.
|
|
| Al....
|
|
|
| "Stefan B Rusynko" wrote:
|
| > Move the code I gave you above
| > <%
| > ' FP_ASP ASP Automatically generated by a FrontPage Component. Do not Edit.
| >
| > That is the top of the page (isn't it)
| >
| > And how do you expect the form to send a dropdown form field value if you don't set a value for it?
| >
| > You have
| > <select size="1" name="DriveReplaced" style="font-size: 16pt" tabindex="3">
| > <option selected>No</option>
| > <option>Yes</option>
| > </select>
| >
| > All that sends is a selected index # (0 or 1) and not a Yes or No
| >
| > You should have (w/o your massive font):
| > <select size="1" name="DriveReplaced" tabindex="3">
| > <option selected value="No">No</option>
| > <option value="Yes">Yes</option>
| > </select>
| >
| > PS
| > Same applies to all your other dropdowns which have no values assigned in Form Field Properties
| >
| >
| > IMHO
| > Stop work and start reading all the books you have
| >
| > _____________________________________________
| > SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
| > "Warning - Using the F1 Key will not break anything!" (-;
| > To find the best Newsgroup for FrontPage support see:
| > http://www.net-sites.com/sitebuilder/newsgroups.asp
| > _____________________________________________
| >
| >
| > | Here's the code for the whole page.
| > |
| > | <%
| > | ' 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 = 2057
| > | 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("Database_ConnectionString")
| > | FP_DumpError strErrorUrl, "Cannot open database"
| > |
| > | fp_rs.Open "Results", 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(6)
| > | Dim arFormDBFields0(6)
| > | Dim arFormValues0(6)
| > |
| > | arFormFields0(0) = "DriveNo"
| > | arFormDBFields0(0) = "DriveNo"
| > | arFormValues0(0) = Request("DriveNo")
| > | arFormFields0(1) = "DriveReplaced"
| > | arFormDBFields0(1) = "DriveReplaced"
| > | arFormValues0(1) = Request("DriveReplaced")
| > | arFormFields0(2) = "TrayFault"
| > | arFormDBFields0(2) = "TrayFault"
| > | arFormValues0(2) = Request("TrayFault")
| > | arFormFields0(3) = "UnlistedFault"
| > | arFormDBFields0(3) = "UnlistedFault"
| > | arFormValues0(3) = Request("UnlistedFault")
| > | arFormFields0(4) = "TrayReplaced"
| > | arFormDBFields0(4) = "TrayReplaced"
| > | arFormValues0(4) = Request("TrayReplaced")
| > | arFormFields0(5) = "DriveFault"
| > | arFormDBFields0(5) = "DriveFault"
| > | arFormValues0(5) = Request("DriveFault")
| > |
| > | FP_SaveFormFields fp_rs, arFormFields0, arFormDBFields0
| > |
| > | If Request.ServerVariables("REMOTE_HOST") <> "" Then
| > | FP_SaveFieldToDB fp_rs, Request.ServerVariables("REMOTE_HOST"),
| > | "Remote_computer_name"
| > | End If
| > | If Request.ServerVariables("HTTP_USER_AGENT") <> "" Then
| > | FP_SaveFieldToDB fp_rs, Request.ServerVariables("HTTP_USER_AGENT"),
| > | "Browser_type"
| > | End If
| > | FP_SaveFieldToDB fp_rs, Now, "Timestamp"
| > | If Request.ServerVariables("REMOTE_USER") <> "" Then
| > | FP_SaveFieldToDB fp_rs, Request.ServerVariables("REMOTE_USER"), "User_name"
| > | End If
| > |
| > | 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 "Database.asp"
| > |
| > | End If
| > | End If
| > |
| > | Session.CodePage = Session("FP_OldCodePage")
| > | Session.LCID = Session("FP_OldLCID")
| > |
| > | %>
| > | <%
| > | For Each Item In Request.Form
| > | fieldName = Item
| > | fieldValue = Request(Item)
| > | Response.Write fieldName & " = " & fieldValue & "<br>"
| > | Next
| > | %>
| > |
| > | <%
| > | Response.write "Drive Replaced value = " & Request.Form("DriveReplaced")
| > | If Request.Form("DriveReplaced") = "Yes" Then Response.Redirect "BL35P.asp"
| > | %>
| > |
| > | <html>
| > |
| > | <head>
| > | <meta http-equiv="Content-Language" content="en-gb">
| > | <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
| > | <title>New Page 1</title>
| > | </head>
| > |
| > | <body>
| > | <h1 align="center">Database<br>
| > | </h1>
| > | <form method="POST" action="--WEBBOT-SELF--" name="Database.asp">
| > | <!--webbot bot="SaveDatabase" SuggestedExt="asp"
| > | S-DataConnection="Database" S-RecordSource="Results"
| > | U-Database-URL="../fpdb/Database.mdb" S-Builtin-Fields="REMOTE_HOST
| > | HTTP_USER_AGENT Timestamp REMOTE_USER"
| > | S-Builtin-DBFields="Remote_computer_name Browser_type Timestamp User_name"
| > | S-Form-Fields="DriveNo DriveReplaced TrayFault UnlistedFault TrayReplaced
| > | DriveFault" S-Form-DBFields="DriveNo DriveReplaced TrayFault UnlistedFault
| > | TrayReplaced DriveFault" U-ASP-Include-Url="../_fpclass/fpdbform.inc"
| > | startspan U-Confirmation-Url="Database.asp" --><input TYPE="hidden"
| > | NAME="VTI-GROUP" VALUE="0"><!--#include
| > | file="../_fpclass/fpdbform.inc"--><!--webbot bot="SaveDatabase" endspan
| > | i-checksum="34604" -->
| > | <p><font style="font-size: 16pt; font-weight: 700">Drive Number</font><br>
| > | <font style="font-size: 16pt; font-weight: 700">
| > | <input type="text" name="DriveNo" size="20" style="font-size: 16pt"
| > | tabindex="1"></font></p>
| > | <p><font style="font-size: 16pt; font-weight: 700">Drive
| > | Fault
| > | Drive Replaced</font><br>
| > | <font style="font-size: 16pt; font-weight: 700">
| > | <select size="1" name="DriveFault" style="font-size: 16pt" tabindex="2">
| > | <option selected>No Fault Found</option>
| > | <option>Imminent Failure</option>
| > | <option>Failed To ID</option>
| > | <option>Damaged Connector</option>
| > | <option>Had Partition</option>
| > | </select>
| > | <select size="1" name="DriveReplaced" style="font-size: 16pt" tabindex="3">
| > | <option selected>No</option>
| > | <option>Yes</option>
| > | </select> </font></p>
| > | <p><font style="font-size: 16pt; font-weight: 700">Tray
| > | Fault Tray
| > | Replaced</font><br>
| > | <font style="font-size: 16pt; font-weight: 700">
| > | <select size="1" name="TrayFault" style="font-size: 16pt" tabindex="4">
| > | <option selected>No Fault Found</option>
| > | <option>Damaged Tray</option>
| > | <option>Missing Handle</option>
| > | <option>Broken Handle</option>
| > | <option>Missing Antiship Rod</option>
| > | </select>
| > | <select size="1" name="TrayReplaced" style="font-size: 16pt" tabindex="5">
| > | <option selected>No</option>
| > | <option>Yes</option>
| > | </select></font></p>
| > | <p><font style="font-size: 16pt; font-weight: 700">Unlisted Fault</font><br>
| > | <font style="font-size: 16pt; font-weight: 700">
| > | <textarea rows="4" name="UnlistedFault" cols="51" style="font-size: 16pt;
| > | font-weight:bold" tabindex="6">
 
G

Guest

just to let you know i created a simple page with no FP components on it and
i git it to work with a minor change see code

<%
If Request("DriveReplaced") = "Yes" Then Response.Redirect "Replacement.asp"
If Request("DriveReplaced") = "Awaiting Spares" Then Response.Redirect
"Spares.asp"
If Request("DriveReplaced") = "No" Then Response.Redirect "test.asp"
%>

<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>New Page 1</title>
</head>

<body>
<form>
<select size="1" name="DriveReplaced" style="font-size: 16pt" tabindex="3">
<option selected value="No">No</option>
<option value="Yes">Yes</option>
<option value="Awaiting Spares">Awaiting Spares</option>
</select>

<input type="submit" value="Submit" name="B1" style="font-size: 16pt">
</form>


</body>

</html>

It would not work if it was coded Request.Form("DriveReplaced")

I suppose it's a starting place.


Al....


Stefan B Rusynko said:
If you don't know if it is VBscript (ASP) you probably shouldn't attempt below
- the pages should have a .asp extension if you are running ASP

At the top of your .asp page add
<%
Request.Form("yourformfieldnamehere")
If Request.Form("yourformfieldnamehere")="Yes" Then response.redirect "yourpage2.asp"
'goes to page 2.asp only if the form has sent a field value of "Yes"
%>

--




| Everything was set up through FP 2003, sending to Access DB, so i'd assume
| it's using VBScript.
|
| "Stefan B Rusynko" wrote:
|
| > Yes
| > - but not w/ the FP Default forms handler
| > If you are using a server side script language to send the form to the DB
| > - then it depends on the language you are using
| > --
| >
| > _____________________________________________
| > SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
| > "Warning - Using the F1 Key will not break anything!" (-;
| > To find the best Newsgroup for FrontPage support see:
| > http://www.net-sites.com/sitebuilder/newsgroups.asp
| > _____________________________________________
| >
| >
| > | currently i have a form that submits information entered by the user (we'll
| > | call it page1) once the information is entered it is sent to a database and
| > | the page redirects to its-self. that's all fine.
| > | What i want to know is if a certain field (dropdown box) is YES, can i still
| > | submit the information but redirect to another page, say page 2, fill the
| > | information in, then when submited redirect back to page 1
| > |
| > | i hope i've not confused anyone with the above, as i've usually got a habit
| > | of not explaining myself correctly.
| > |
| > | Any help would be appreciated.
| > |
| >
| >
| >
 

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