PDA

View Full Version : form field live update or operation



noobster
01-15-2007, 11:20 AM
Hello,

i hope and i guess i'm in the right forum for this question.

my problem:
---------------
i have a form with a article, a price and a price category
article : numeric
price: numeric
category: radio button (less than 100, between this an this....)

what i would like
--------------
i would like to know if there is a way to put my article in a category without having to choose one manually. so could there be an operation in javascript that would take my "price" and calculate a category automaticaly (after submiting or not) and putting the right category in my database?

i don't really know how to mix javascript (or ajax) and php sql so i admit i'm lost.

i hope that was clear.

thanks for any help

parijaatp
01-16-2007, 12:20 PM
This solution is using Vbscript--If you are considering of submitting the page then read the values using variable=request.form("controlname") wither on the same pag or next. This depends on the action element of the form.

Compare the variable and decide the category (say variable2). Then store that in the database where category name will be variable2.

Hope that helps!!

noobster
01-16-2007, 03:03 PM
i'll have a check cause i think it's the only way to go, store data and treat it.

thanks for the help.