|
| |
|
|
DaveKstl
Posts: 547 Joined: 4/21/2004 Status: offline
|
Can a webbot confirmation field be used in asp - 4/21/2004 17:18:24
I have a submit form which uses a dropdown created in the DRW. I am passing that value CLASSID through to a custom confirmation page. I can see the value when I use the Confirmation Field but not when I use an asp script <%=ClassID%> in the form. Can a confirmation field value or a webbot value be used in asp? Thanks
|
|
|
|
BeTheBall
Posts: 6362 Joined: 6/21/2002 From: West Point Utah USA Status: offline
|
RE: Can a webbot confirmation field be used in asp - 4/21/2004 17:32:28
Try: <%=Request.Form("ClassID")%> And Welcome to Outfront!
_____________________________
Duane Some people are like Slinkies . . . Not really good for anything . . . . . But they still bring a smile to your face when you push them down a flight of stairs.
|
|
|
|
DaveKstl
Posts: 547 Joined: 4/21/2004 Status: offline
|
RE: Can a webbot confirmation field be used in asp - 4/21/2004 17:39:59
Thanks for the welcome. I tried the code you suggeted and the information will not display. However the <-webbot bot="ConfirmationField" s-field="ClassID" --> does produce a result. Can asp use a web bot generated value?
|
|
|
|
BeTheBall
Posts: 6362 Joined: 6/21/2002 From: West Point Utah USA Status: offline
|
RE: Can a webbot confirmation field be used in asp - 4/21/2004 17:59:38
quote:
Can asp use a web bot generated value? Good question. Never tried it. When you say it produce a result, is it the right result? If it is, then I guess you have answered your own question. Having reread your post, I can see why Request.Form would not work. The reason is the form does not submit to the confirmation page. It submits to itself and then redirects to the confirmation page which makes the form values no longer available. You can also use the DRW on the confirmation page to display the record that was just inserted. For more information on that, you may find this helpful: http://www.outfront.net/spooky/adv_new_id.htm
_____________________________
Duane Some people are like Slinkies . . . Not really good for anything . . . . . But they still bring a smile to your face when you push them down a flight of stairs.
|
|
|
|
DaveKstl
Posts: 547 Joined: 4/21/2004 Status: offline
|
RE: Can a webbot confirmation field be used in asp - 4/21/2004 18:31:12
The reuslt using the web bot was correct. It seems odd that this value was passed through via a web bot, but I cannot use it in ASP. The value is out there, I just don't how to get it. dave
|
|
|
|
BeTheBall
Posts: 6362 Joined: 6/21/2002 From: West Point Utah USA Status: offline
|
RE: Can a webbot confirmation field be used in asp - 4/21/2004 19:36:45
How about adding the for field value to the query string of the confirmation page? It would then be available to the confirmation page. Post the code for the page that contains the submission form and I can show you how to modify the code so that the ClassID form field is passed along in the querystring.
_____________________________
Duane Some people are like Slinkies . . . Not really good for anything . . . . . But they still bring a smile to your face when you push them down a flight of stairs.
|
|
|
|
DaveKstl
Posts: 547 Joined: 4/21/2004 Status: offline
|
RE: Can a webbot confirmation field be used in asp - 4/22/2004 7:36:50
Thanks for the help! I am sending 2 responses. This one describes what I am attempting to do. The code will follow in the second and is a small piece of the rest of the page. The concept will be repeated in several places on the page. If I can get past one, the others will be repeated code. The user is to select a training class from a drop down. The drop down is populated from a database which contains classid Class Date classid is a unique number which I am using to drive other pages including the confirmation page. Class is a description of the course Date is the starting date On the registration page (submit1.asp to follow) I am using a dropdown populated by this database and passing the classid. The problem is the confirmation page. I want the user to see all of the information they entered and convert the ID into Class & Date. The user won't remember what the ID means from page to page. I have two approaches on the confirmation, 1. I can pass all of the information to a verify page and then to the database (a lot of coding especially if there are changes) 2. I can pass the information to the database and to a confirmation page the people can understand. Any help or best practices would be helpful. Dave
|
|
|
|
DaveKstl
Posts: 547 Joined: 4/21/2004 Status: offline
|
RE: Can a webbot confirmation field be used in asp - 4/22/2004 7:37:56
<html> <head> <% ' FP_ASP -- ASP Automatically generated by a FrontPage Component. Do not Edit. FP_CharSet = "windows-1252" FP_CodePage = 1252 %> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <title>New Page 1</title> </head> <body> <form method="POST" action="--WEBBOT-SELF--"> <!--webbot bot="SaveDatabase" SuggestedExt="asp" S-DataConnection="Submit1" S-RecordSource="Results" U-Database-URL="fpdb/Submit1.mdb" U-Confirmation-Url="Confirm.asp" 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="Name ClassID" S-Form-DBFields="Name ClassID" --> <p><nobr> <!--webbot bot="DatabaseRegionStart" s-columnnames="ID,Class,Date,Complete,Cancel,Remote_computer_name,User_name,Browser_type,Timestamp" s-columntypes="3,202,135,11,11,202,202,202,135" s-dataconnection="LMS" b-tableformat="FALSE" b-menuformat="TRUE" s-menuchoice="Class" s-menuvalue="ID" b-tableborder="TRUE" b-tableexpand="TRUE" b-tableheader="TRUE" b-listlabels="TRUE" b-listseparator="TRUE" i-listformat="0" b-makeform="FALSE" s-recordsource="Classes" s-displaycolumns="ID,Class,Date" s-criteria s-order="[Class] + [Date] +" s-sql="SELECT * FROM Classes ORDER BY Class ASC,Date ASC" b-procedure="FALSE" clientside suggestedext="asp" s-defaultfields s-norecordsfound="No records returned." i-maxrecords="256" i-groupsize="0" botid="0" u-dblib="_fpclass/fpdblib.inc" u-dbrgn1="_fpclass/fpdbrgn1.inc" u-dbrgn2="_fpclass/fpdbrgn2.inc" preview=" <span style="color: rgb(0,0,0); background-color: rgb(255,255,0)">Database</span> " startspan b-InForm="TRUE" b-UseDotNET="FALSE" CurrentExt sa-InputTypes b-DataGridFormat="FALSE" b-DGridAlternate="TRUE" sa-CritTypes b-WasTableFormat="FALSE" --><!--#include file="_fpclass/fpdblib.inc"--> <% if 0 then %> <SCRIPT Language="JavaScript"> document.write("<div style='background: yellow; color: black;'>The Database Results component on this page is unable to display database content. The page must have a filename ending in '.asp', and the web must be hosted on a server that supports Active Server Pages.</div>"); </SCRIPT> <% end if %> <% fp_sQry="SELECT * FROM Classes ORDER BY Class ASC,Date ASC" fp_sDefault="" fp_sNoRecords="No records returned." fp_sDataConn="LMS" fp_iMaxRecords=256 fp_iCommandType=1 fp_iPageSize=0 fp_fTableFormat=False fp_fMenuFormat=True fp_sMenuChoice="Class" fp_sMenuValue="ID" fp_sColTypes="&ID=3&Class=202&Date=135&Complete=11&Cancel=11&Remote_computer_name=202&User_name=202&Browser_type=202&Timestamp=135&" fp_iDisplayCols=3 fp_fCustomQuery=False BOTID=0 fp_iRegion=BOTID %> <!--webbot bot="DatabaseRegionStart" endspan i-checksum="9607" --><select NAME="ClassID" SIZE="1"> <!--webbot bot="AspInclude" clientside u-incfile="_fpclass/fpdbrgn1.inc" startspan --><!--#include file="_fpclass/fpdbrgn1.inc"--> <!--webbot bot="AspInclude" endspan i-checksum="258" --> <option VALUE="<%=FP_FieldHTML(fp_rs,"ID")%>|<%=FP_FieldHTML(fp_rs,"Date")%>"><%=FP_FieldHTML(fp_rs,"Class")%> <%=FP_FieldHTML(fp_rs,"Date")%> </option> <!--webbot bot="AspInclude" clientside u-incfile="_fpclass/fpdbrgn2.inc" startspan --><!--#include file="_fpclass/fpdbrgn2.inc"--> <!--webbot bot="AspInclude" endspan i-checksum="266" --> </select><!--webbot bot="DatabaseRegionEnd" b-tableformat="FALSE" b-menuformat="TRUE" u-dbrgn2="_fpclass/fpdbrgn2.inc" i-groupsize="0" clientside preview=" <span style="color: rgb(0,0,0); background-color: rgb(255,255,0)">Results</span> " startspan --><!--webbot bot="DatabaseRegionEnd" endspan --></nobr></p> <p><input type="text" name="Name" size="20" value="Last Name"></p> <p><input type="submit" value="Submit" name="B1"><input type="reset" value="Reset" name="B2"></p> <input type="hidden" name="Dave" value=ClassID> <input type="hidden" name="Dave2" value=Class> <input type="hidden" name="Bob" value="777"> </form> </body> </html>
|
|
|
|
DaveKstl
Posts: 547 Joined: 4/21/2004 Status: offline
|
RE: Can a webbot confirmation field be used in asp - 4/22/2004 7:38:59
One last piece is that I can figure most things out once I see the light. I am using FP2003 and the wizards to make life easy or so I thought. Dave
|
|
|
|
BeTheBall
Posts: 6362 Joined: 6/21/2002 From: West Point Utah USA Status: offline
|
RE: Can a webbot confirmation field be used in asp - 4/22/2004 9:28:14
Did you look at the tutorial I mentioned above? If you follow that tutorial, you can then pass the id of the newly created record and use a new DRW on the confirmation page to display any field you want from the record the user just submitted. The tutorial teaches you how to submit the record and immediately get the ID which is assigned to a variable called NewID. You can then on the confirmation page use a DRW to show the record using a SQL statement of: SELECT * FROM YourTable WHERE classid="&NewID&" So instead of using FP's confirmation fields, you just use the DRW to write to the page the actual database values that the user just submitted. Make any sense?
_____________________________
Duane Some people are like Slinkies . . . Not really good for anything . . . . . But they still bring a smile to your face when you push them down a flight of stairs.
|
|
|
|
DaveKstl
Posts: 547 Joined: 4/21/2004 Status: offline
|
RE: Can a webbot confirmation field be used in asp - 4/22/2004 9:35:12
I did the tutorial and I found removing the web bots interesting. So I am still unsure! The Submit page (registration) is Submitting, then this feeds a Verify Page then the values are input ...or... The Submit page (registration) is Submitting, then this feeds a Confirmation Data Entry page I have to play again, I am not sure how to make the DRW enter data, I know that it can show data. Dave
|
|
|
|
DaveKstl
Posts: 547 Joined: 4/21/2004 Status: offline
|
RE: Can a webbot confirmation field be used in asp - 4/22/2004 9:41:25
I guess that I am still hung up on the dropdown data. The dropdown ClassID is created form CLASS DATE ID comes from another database called Classes. I know that I can capture the ClassID which represents Class & Date but I can't show Class & Date on the confirm page. Dave
|
|
|
|
BeTheBall
Posts: 6362 Joined: 6/21/2002 From: West Point Utah USA Status: offline
|
RE: Can a webbot confirmation field be used in asp - 4/22/2004 9:46:41
You can, you will just have to get a little fancier with your SQL. How are you at Access? What you can do is create a query in Access that joins the two tables and then use the query as the source for the DRW on the confirmation page.
_____________________________
Duane Some people are like Slinkies . . . Not really good for anything . . . . . But they still bring a smile to your face when you push them down a flight of stairs.
|
|
|
|
DaveKstl
Posts: 547 Joined: 4/21/2004 Status: offline
|
RE: Can a webbot confirmation field be used in asp - 4/22/2004 9:48:53
I am looking through my code, none show <!--#include file="_fpclass/fpdbform.inc"--> Do I include anything that has include in it?
|
|
|
|
DaveKstl
Posts: 547 Joined: 4/21/2004 Status: offline
|
RE: Can a webbot confirmation field be used in asp - 4/22/2004 9:49:31
I am really good with ACCESS
|
|
|
|
BeTheBall
Posts: 6362 Joined: 6/21/2002 From: West Point Utah USA Status: offline
|
RE: Can a webbot confirmation field be used in asp - 4/22/2004 10:01:09
I can see this: <!--#include file="_fpclass/fpdbform.inc"--> above in the code for your submission form. Very end of this large block of code: <!--webbot bot="DatabaseRegionStart" s-columnnames="ID,Class,Date,Complete,Cancel,Remote_computer_name,User_name,Browser_type,Timestamp" s-columntypes="3,202,135,11,11,202,202,202,135" s-dataconnection="LMS" b-tableformat="FALSE" b-menuformat="TRUE" s-menuchoice="Class" s-menuvalue="ID" b-tableborder="TRUE" b-tableexpand="TRUE" b-tableheader="TRUE" b-listlabels="TRUE" b-listseparator="TRUE" i-listformat="0" b-makeform="FALSE" s-recordsource="Classes" s-displaycolumns="ID,Class,Date" s-criteria s-order="[Class] + [Date] +" s-sql="SELECT * FROM Classes ORDER BY Class ASC,Date ASC" b-procedure="FALSE" clientside suggestedext="asp" s-defaultfields s-norecordsfound="No records returned." i-maxrecords="256" i-groupsize="0" botid="0" u-dblib="_fpclass/fpdblib.inc" u-dbrgn1="_fpclass/fpdbrgn1.inc" u-dbrgn2="_fpclass/fpdbrgn2.inc" preview=" <span style="color: rgb(0,0,0); background-color: rgb(255,255,0)">Database</span> " startspan b-InForm="TRUE" b-UseDotNET="FALSE" CurrentExt sa-InputTypes b-DataGridFormat="FALSE" b-DGridAlternate="TRUE" sa-CritTypes b-WasTableFormat="FALSE" --><!--#include file="_fpclass/fpdblib.inc"-->
_____________________________
Duane Some people are like Slinkies . . . Not really good for anything . . . . . But they still bring a smile to your face when you push them down a flight of stairs.
|
|
|
|
DaveKstl
Posts: 547 Joined: 4/21/2004 Status: offline
|
RE: Can a webbot confirmation field be used in asp - 4/22/2004 10:13:30
This shows -#include file="_fpclass/fpdblib.inc"--> not <!--#include file="_fpclass/fpdbform.inc"--> I saw that but I did not want to remove it. There are more <!--#include file did I keep them all? Dave
|
|
|
|
DaveKstl
Posts: 547 Joined: 4/21/2004 Status: offline
|
RE: Can a webbot confirmation field be used in asp - 4/22/2004 10:23:04
Ok I am with you -- :-) I kept all the include files and I passed info. Now how do I capture the Class & Date Fields from the submit page? Dave
|
|
|
|
BeTheBall
Posts: 6362 Joined: 6/21/2002 From: West Point Utah USA Status: offline
|
RE: Can a webbot confirmation field be used in asp - 4/22/2004 10:55:56
Technically speaking? You don't. What you do is use a new DRW to show the results from the db record using the ID of the record that was just submitted. First, as I mentioned, I would create a query in Access that joins Classes table and the table that your form submits to. Then when you use the DRW the query will show as an option when you select your table in step 2. So, go to the confirmation page and insert a new database results region. In step 1, choose your connection. Step 2, choose the query than combines the aforementioned tables. Step 3, (this might get tricky) choose the fields you want to display and then select the "More Options" button and select the "Criteria" button. Choose the ID field of the table your form submitted to as the Field Name (Not the ClassID from the Class table), choose Equals as the Comparison, enter the number 1 as the value and uncheck the Use this search form field checkbox. Click OK three times and then click "Next" to move to step 4. Complete step 4 as normal, this is just where you decide how you want the results formatted. Complete Step 5. Now, you have to modify the WHERE clause to accept the NewID variable. However, FP will not let you without getting rid of the webbots first. Soooo, follow the link in my signature titled Spooky Diet. It is similar to what you did to the submission page. Once the code is dieted, modify your SQL statement so instead of reading: WHERE YourIDField=1 it reads: WHERE YourIDField="&NewID&" Remember to substitute the actual name of your ID field where I have typed "YourIDField". That should do it. Good luck!
_____________________________
Duane Some people are like Slinkies . . . Not really good for anything . . . . . But they still bring a smile to your face when you push them down a flight of stairs.
|
|
|
|
DaveKstl
Posts: 547 Joined: 4/21/2004 Status: offline
|
RE: Can a webbot confirmation field be used in asp - 4/22/2004 11:25:37
I see the light!!!!!!!!!!!!!!!!!!!!!!!!!!! Thank you!!!!!!!!!!!!!!!!!! I got it!!!!!!!!!!!!!!!!!!!!!! Dave :-) PS I was barking up the wrong tree!
|
|
|
|
DaveKstl
Posts: 547 Joined: 4/21/2004 Status: offline
|
RE: Can a webbot confirmation field be used in asp - 4/22/2004 16:18:59
Ok I am stuck again - probably brain dead. I did everything to the confirm page in the first paragraph of your explaination Created a query, used it for the results set the ID to 1 in the Criteria, unchecked the search box ... I am working with the real pages now. Do both the submit and confirm page need to be stripped of web bots. This is massive! I copied the macro, and ran spooky, but nothing was stripped. Second the ID is autonumbered so when I enter the Number 1 I only get the first record not the last entry or the highest record. Do I enter the &NewID& in the submit page and then reference it in the results query? Am I lost again? Dave
|
|
|
|
DaveKstl
Posts: 547 Joined: 4/21/2004 Status: offline
|
RE: Can a webbot confirmation field be used in asp - 4/22/2004 18:05:01
I am not using themes. The macro seems like a great idea. To get the page up, I cheated. I created queriers on the server picking the max registration number and then applying this against the registration DB. There is a remote possibility that two people at the exact time will get the wrong record but I doubt it. Now back to coding. I have to go back to the submit page and start again. I need to get this to work because the entire site is built around database info. So first I need to strip the submit page then see if info passes with your number generator. Dave
|
|
|
|
BeTheBall
Posts: 6362 Joined: 6/21/2002 From: West Point Utah USA Status: offline
|
RE: Can a webbot confirmation field be used in asp - 4/22/2004 18:24:05
That's a good approach. Get the submission form doing what it needs to do and then move to the confirmation page. I believe the confirmation page will be the easier of the two tasks if you can get the hang of the Spooky Diet. One thing, do not try the macro on the submission page. That page needs to be manually edited following the instructions in the link I provided above. I will send you a private message with my email and if you get stuck, you can send me the page. I have done this process about 200 times now, so it doesn't take me long.
_____________________________
Duane Some people are like Slinkies . . . Not really good for anything . . . . . But they still bring a smile to your face when you push them down a flight of stairs.
|
|
|
|
DaveKstl
Posts: 547 Joined: 4/21/2004 Status: offline
|
RE: Can a webbot confirmation field be used in asp - 4/23/2004 16:17:30
I have got the Submit form showing info. I want to show info on a custom confirmation, but I don't know the code and where to insert on the confirmation page. I have the Request query in place, but where does that go? Thanks Dave
|
|
|
|
DaveKstl
Posts: 547 Joined: 4/21/2004 Status: offline
|
RE: Can a webbot confirmation field be used in asp - 4/23/2004 16:22:17
Also the redirect code, where does it go. There isn't any on the page. Dave
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
|
|
|