navigation
a webmaster learning community
     Home    Register     Search      Help      Login    
Sponsors

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Search Forums
 

Advanced search
Recent Posts

 Todays Posts
 Most Active posts
 Posts since last visit
 My Recent Posts
 Mark posts read

Microsoft MVP

 

ASP & Calculations

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> ASP and Database >> ASP & Calculations
Page: [1]
 
xterradane

 

Posts: 143
From: Mobile, AL USA
Status: offline

 
ASP & Calculations - 1/9/2002 13:45:11   
I am trying to generate an invoice with total based on amount of days they chose, however, I have not been able to get it to work, making me think this is not the way to do it. I also tried with a Function, but that did not work either. Any suggestions?

Do While Not rsJob.EOF
Response.Write "<TR><TD WIDTH=""60%"" COLSPAN=""2""> " & rsJob("JobTitle") &"</TD>" &_
"<TD WIDTH=""20%"" P ALIGN=""CENTER"">" & rsJob("DaysPosted") &"</TD>"

If Request.Form("DaysPosted")= "30" Then
Response.Write "<TD WIDTH=""20%"" P ALIGN=""CENTER""> 25.00</TD>"
Else If Request.Form("DaysPosted") = "60" Then
Response.Write "<TD WIDTH=""20%"" P ALIGN=""CENTER""> 45.00</TD>"
Else If Request.Form("DaysPosted") = "90" Then
Response.Write "<TD WIDTH=""20%"" P ALIGN=""CENTER""> 60.00</TD>"
End If


 
rdouglass

 

Posts: 9265
From: Biddeford, ME USA
Status: offline

 
RE: ASP & Calculations - 1/9/2002 14:11:49   
What kind of output are you getting if any)??? Maybe you can quickly try:

If Request.Form("DaysPosted")= 30 Then

(Notice no quotes)....

 

(in reply to xterradane)
xterradane

 

Posts: 143
From: Mobile, AL USA
Status: offline

 
RE: ASP & Calculations - 1/9/2002 14:21:24   
I wasn't getting any output. I will try tonight with no quotes and see if that works.
I will let you know.

Thanks

 

(in reply to xterradane)
rdouglass

 

Posts: 9265
From: Biddeford, ME USA
Status: offline

 
RE: ASP & Calculations - 1/9/2002 14:35:16   
OOPS- also noticed some prob w/ your Response.Write lines. IIRC they should be something like:

Response.Write("<TD WIDTH='20%' P ALIGN='CENTER'> 25.00</TD>")

(Notice the single quotes...)

Sorry I missed it.....

 

(in reply to xterradane)
xterradane

 

Posts: 143
From: Mobile, AL USA
Status: offline

 
RE: ASP & Calculations - 1/9/2002 17:04:32   
funny, it works fine with the double quotes, I think I got that from a book....

 

(in reply to xterradane)
xterradane

 

Posts: 143
From: Mobile, AL USA
Status: offline

 
RE: ASP & Calculations - 1/9/2002 18:26:24   
It still did not work. It is just not printing the 25/45/60? Any other ideas?

 

(in reply to xterradane)
Spooky

 

Posts: 26603
Joined: 11/11/1998
From: Middle Earth
Status: offline

 
RE: ASP & Calculations - 1/9/2002 20:37:51   
Do While Not rsJob.EOF
Response.Write "<TR><TD WIDTH=""60%"" COLSPAN=""2""> " & rsJob("JobTitle") &"</TD>" &_
"<TD WIDTH=""20%"" ALIGN=""CENTER"">" & rsJob("DaysPosted") &"</TD>"

DaysPosted = rsJob("DaysPosted")

If DaysPosted= "30" Then
Response.Write "<TD WIDTH=""20%"" ALIGN=""CENTER""> 25.00</TD>"
ElseIf DaysPosted = "60" Then
Response.Write "<TD WIDTH=""20%"" ALIGN=""CENTER""> 45.00</TD>"
ElseIf DaysPosted = "90" Then
Response.Write "<TD WIDTH=""20%"" ALIGN=""CENTER""> 60.00</TD>"
End If

Im assuming daysposted is actually the database return you need?

§þððk¥
Database / DRW Q & A
VP-ASP Shopping cart
Spooky Login

(in reply to xterradane)
rdouglass

 

Posts: 9265
From: Biddeford, ME USA
Status: offline

 
RE: ASP & Calculations - 1/10/2002 0:29:41   
OOPS! way off - sorry..

 

(in reply to xterradane)
xterradane

 

Posts: 143
From: Mobile, AL USA
Status: offline

 
RE: ASP & Calculations - 1/10/2002 9:22:20   
Thanks Spooky, I may go back and change it your way. Last night I just decided to add a field to the database table for AmountOwed and do a calculation on Adding and it worked. I am sure your way would work. Thanks for all the help. I've got the print this one so I have it for future reference!

 

(in reply to xterradane)
Page:   [1]

All Forums >> Web Development >> ASP and Database >> ASP & Calculations
Page: [1]
Jump to: 1





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