Click to See Complete Forum and Search --> : Script for calculating total price.


nickeford
12-13-2002, 07:19 AM
Hi
I'm wanting to have a form on my site that will automatically update the price of something when the quantity is entered. I thought about using the "onblur" function so that it updates once the user has tabbed out of that field, but I don't know what to put after that...

To see a bit clearer what I mean you can see the form here (http://homepage.ntlworld.com/marilyn.ford/ticketorderform.html)

Is there a script I can use to do this?

Thanks for any help

Nick

jalarie
12-13-2002, 07:55 AM
onblur="chg1(this.form);"

Then chg1 would be a JavaScript funciton that would do the work. If you'd like an example, please visit the "Samples of my work > Order form" page at my site:

 http://spruce.flint.umich.edu/~jalarie/

Vladdy
12-13-2002, 08:04 AM
I would suggest using onchange event rather than onblur.

While what you trying to do is quite simple, I doubt that you will be able to find a cut-and-paste script.