Performing Calculations
I'd like to have an ASP form performing a relatively simple calculation. For example, if I wanted to create a simple order form where someone enters a quantity of tickets, the form would automatically calculate the total cost in a second text box based on the number (qty) entered times the cost of a single ticket.
Such that, if the user entered "2" in one text box, it would automatically generate the total cost of, say $34.00 in a second text box based on the cost of a single ticket being $17.00.
View Replies
ADVERTISEMENT
i'm confused about perfoming insert, update and delete operations in a database. I know that to only use SELECT statement you would create a recordset and use it but for all other you need to use Command or Connection Object.
I'm confused because in some books/articles they create and open a connection and perform insert/update using that. in others they say to use Command object instead. which one do u use when?, why?.
View Replies
View Related
I have a asp page that contains link(A href tag) to some other page.When the user clicks on the link ,I want to perform a insert SQL statement and then link it to target page.Is it possible?
View Replies
View Related
Does anyone know of a pure ASP way of doing this?I am displaying the results of a large recordset and at the moment it looks like the page is not doing anything.I have a solution using an image and some javascript, f there was a way of doing it in ASP, perhaps using the response buffer?
View Replies
View Related
Is there a way to force a sub or a function to be executed before the
user to move to another ASP page?
In fact I want to update a basket (table) if the user wrote a quantity
for a product in the page. I want to avoid them to click for every
single product they add.
View Replies
View Related
I often have to calculate totals as a result of a recordset,but i'd really like to sort by the calculated totals field.Quite often the calculations invlove values extracted from other stored procedures,so it's not a simple case of adding as part of the select statement.
I've made a post under the SQL forum (URL address blocked: See forum rules) as i'm using SQL, but i mainly consider myself an ASP programmer so would like to hear how you guys resolve this issue.
View Replies
View Related
The following code doesn't produce a valid output as the calculation is invalid if the DOB and Now() are within the same Month and at least two days in the calendar year from eachother. e.g. if a person was born on 06/18/1975 and today's date is 06/16/2005, the age comes back as age=30. what I can change to make it work;
<%Response.Write Left(FormatNumber((DateDiff("d", Session("DOB"), Now()) / 365),0),2) %> .
View Replies
View Related
I want to do and show calculations in the same form before submitting. Idea is to create a purchase order (like we do add to cart in most ecommerce site) and show items being selected from data base and person puts quantity and amount is displayed.
This amount/rate shall be submitted via form.
View Replies
View Related
I'm looking for a function that returns a date range for a specified week number of the year I'm not able to find functions like this anywhere.
View Replies
View Related
We've changed our comissions for policies that go into effect in 2007. I need to be able to calculate if the date a renewal is processed is in the 2nd year or 3rd year of the policy's effective date, since those two have different rates.there's a leap year in there and I've heard that DateDiff doesn't always work the way you'd expect it to.
View Replies
View Related
I'm having the simplest of problems we've implemented worldpay and as you might know worldpay doesn't allow you to enter more than one item at a time. I want to allow the user to enter say quantity 2 and then calculate the value say 15.00 and then add the result into the worldpay code.
View Replies
View Related
I'm building a form, there are four currency options.The user might select 1 or more. I need to calculate the total on the fly using javascript and write it to another field.
View Replies
View Related
I have a page which has a buyers premium amount field and an empty field the client will place the amount they wish to bid.
How can I get the page to calculate the premium total and the grand total. will I need to put some sort of button on the page to request the calculation or can it be triggered automatically?
View Replies
View Related
I am trying to do some calculations on large numbers (ie
7,768,489,957,892,578,474,792,094 / 12,280) and no matter what I do it
doesn't get it quite right. Its always somewhere between 10 and and 5000 out
:(
I have a suspition is could be down to one of the number functions I am
using along the way but im not sure.
View Replies
View Related
I'd like to post an excell spreadsheet but allow the user to run calculations with the excell spreadsheet. How do I do this?
View Replies
View Related