|
| |
|
|
FrogMan
Posts: 108 From: Lewiston, Idaho US Status: offline
|
Calculation in FrontPage ASP - 4/11/2001 20:42:00
Same problem, just trying a different statement for help.I have an ASP page with a text field that I want to "count" the number of words, give me a total on the page. Then use that total to multiply by a number to get a result that I can post to a databse and the confirmation page. Here is one set of code that will count the words, but I have info that says I can't use it in an ASP page: --------------------------- <% Dim wordCount, arrWords, strOneWord wordCount = 0 strSentence = Request("AdText") strSentence = Trim(strSentence) Do While InStr(1, strSentence, " ") strSentence = Replace(strSentence, " ", " ") Loop arrWords = Split(strSentence, " ", -1, 1) For Each strOneWord in arrWords wordCount = wordCount +1 Next Response.Write(NumberWords) %> ---------------------------------- Does anyone know of a method in a FrontPage ASP page that I can use formulas and conditions and have the results "write", then post to a database? Appreciate any feedback.
|
|
|
|
Mojo
Posts: 2443 From: Chicago Status: offline
|
RE: Calculation in FrontPage ASP - 4/11/2001 20:40:00
FrogMan,That code looks familiar  It does work in ASP, it is pure VBScript. From what I remember we emailed about, you should be able to send the page information to 1) a file that will process your wordcount and prices 2)then send it to the DB 3) return to a confirmation page and display the field results from the DB. If the user like what he/she sees, they could then do a final submit. I think you could do most of that using FP and its DRW. You would need something custom on the page that will process the user choices, or have it all customized in the DB. NOTE: this line--> strSentence = Replace(strSentence, "*", " ") need 2 spaces where I wrote the "*". Like: code:
strSentence = Replace(strSentence, " ", " ")
Joe [This message has been edited by jbennett (edited 04-11-2001).]
|
|
|
|
FrogMan
Posts: 108 From: Lewiston, Idaho US Status: offline
|
RE: Calculation in FrontPage ASP - 4/11/2001 23:15:00
Joe, you are right. This is the same code you sent last week. But, I haven't been able to get it to work.You filled the whole here, and I will be working on it today between calls. Just seems like everytime I get started on it, I get interrupted, too many hats and not enough time in the day. Thanks again. I'll get back to oyu when I finish this puppy.
|
|
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
|
|
|