Current location: Hot Scripts Forums » Programming Languages » ASP » * Calculations In Asp *


* Calculations In Asp *

Reply
  #1 (permalink)  
Old 09-21-03, 02:20 PM
nabi nabi is offline
Newbie Coder
 
Join Date: Sep 2003
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Question * Calculations In Asp *

hi

i was wondering if anyone knew how to do calculations in asp?
i want to use this to design my first shopping cart.

e.g. when a user clicks on a checkbox, it will automatically recognise that the item is e.g. $30 and then if/when a user clicks on another item which is e.g. $50, the script will add up the $30 + $50 and send it to the url or somewhere else if possible.

i am a beginner in programming so please can you help me with this as i would be very grateful, if you cant help me solve this problem then can you please tell me where i can find a free, good and easy to program paypal shopping cart?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #2 (permalink)  
Old 09-22-03, 09:44 AM
angst angst is offline
Newbie Coder
 
Join Date: Jul 2003
Posts: 23
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by nabi
e.g. when a user clicks on a checkbox, it will automatically recognise that the item is e.g. $30 and then if/when a user clicks on another item which is e.g. $50, the script will add up the $30 + $50 and send it to the url or somewhere else if possible.
simple

<%
dim a,b,c
a + b = c
response.write "Your total is $"&c
%>

C is your total.
store this info in a session or a cookie.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #3 (permalink)  
Old 09-22-03, 11:57 AM
nabi nabi is offline
Newbie Coder
 
Join Date: Sep 2003
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by angst
simple

<%
dim a,b,c
a + b = c
response.write "Your total is $"&c
%>

C is your total.
store this info in a session or a cookie.
_________________________________

Thanks,
should I name my checkboxes; 1,2,3,etc.?
so how would I be able to add them up when and if the user clicks on a checkbox(es).

i hope you understand I am still a beginner in ASP and am finding this a bit tricky ;-)

thanks, nabi
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #4 (permalink)  
Old 09-22-03, 12:13 PM
angst angst is offline
Newbie Coder
 
Join Date: Jul 2003
Posts: 23
Thanks: 0
Thanked 0 Times in 0 Posts
no, don't use numbers for naming, the script can get confused in some cases.
just use letters, or words for names,
like i shoed in the example A, B, C and so on,
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
* Calculations In Php * nabi PHP 0 09-21-03 02:17 PM
* Calculations Made In Javascript * nabi JavaScript 0 09-21-03 02:12 PM


All times are GMT -5. The time now is 12:06 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.