|
| |
|
|
FrogMan
Posts: 108 From: Lewiston, Idaho US Status: offline
|
Edit FP2K with more code - 4/9/2001 19:42:00
Need help. I have received assistance here on some other methods of "calculating" fields on a FrontPage 2000 site. The page I am working on now is an ASP "form" with three sets of tables, but only one field on it is of concern here, a text field that the user inputs info and then I want to know how many words they typed in. I need help "writing in" the code to count words. Here is the code I was provided a few days ago on this same site: <% Dim wordCount, arrWords, strOneWord wordCount = 0 strSentence = Request("AdText") strSentence = Trim(strSentence) arrWords = Split(strSentence, " ", -1, 1) For Each strOneWord in arrWords wordCount = wordCount +1 Next Response.Write(NumberWords) & "<BR>" %>Now the Question: Where do I place it (no jokes, I am serious)? I have placed it in the top of the HTM coding, in the body and inside a field to no avail. I have named numerous fields to try and get it to report on the form. I have hit the "submit" to try and get the results to publish on the "Confirmation" page. As you probably can tell by all this, I am lost. I have a gut feeling that this is the key to the next big step in learning ASP and I only have one more day to finish this project. Any "Direction" would be greatly apprciated.
|
|
|
|
Spooky
Posts: 26606 Joined: 11/11/1998 From: Middle Earth Status: offline
|
RE: Edit FP2K with more code - 4/10/2001 21:05:00
Unfortunately, you cannot add it to a confimation page (where it needs to be) as the webbot for your confirmation page will no longer work. Its a known fault that webbots dont like asp.......
|
|
|
|
FrogMan
Posts: 108 From: Lewiston, Idaho US Status: offline
|
RE: Edit FP2K with more code - 4/11/2001 20:23:00
Spooky, Agree. But, where I would like to have it is in the form ASP page. Thus have the "information post within the Form and then when I click the "submit" it shows in the Confirmation page. I should be able to do this, if I have the results post to the database when the person clicks the Submit buttom at the bottom. It seems like it should be possible, just not sure where to place the strings in the ASP code.I am on the last day of this project, and there has got to be a way.
|
|
|
|
Mojo
Posts: 2441 From: Chicago Status: offline
|
RE: Edit FP2K with more code - 4/11/2001 23:04:00
FrogMan,Make 2 copies of your forms. Give the second a different name. Place your word count code at the top of the code in your second page. Submit your first form to the second. Pass your values to the second page. The code will run and show your wordcount. Change the form destination on the second form so that the information is sent to your DB. That way if the user likes what they have done they can do a final submit. Place a back button on the second form so they can go back and change things if they like. In a nutshell, Form1 gather information and posts to Form2. Form2 runs code. Form2 posts to the DB. I hope this helps, Joe
|
|
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
|
|
|