Link to home
Start Free TrialLog in
Avatar of rmardis
rmardis

asked on

onchange run sql query and return value

Radio1

Radio2

Textbox1 = Quantity (Default value 0)

Textbox2 = UnitCost (Default Value 0)

Textbox3 = Total (Default Value 0)

submit would write the values of all value on the page to a session variabe to be passed to the next page like

Radio1value + Radio2.value = session(product)
textbox1 = session(Quantity)
textbox2 = session(UnitCost)
textbox3 = session(TotalCost)



onchange textbox1

I need to have "if a value is not 0 in textbox1" to run an sql query like
"select UnitCost from Prices where ProductID = Radio1value + Radio2value
and Quantity = TextBox1"


to place the value returned from sql into textbox2 and then mulitplied
against textbox1 showing the total in
textbox3

Any assistance would be greatly appreciated
ASKER CERTIFIED SOLUTION
Avatar of APoPhySpt
APoPhySpt
Flag of Portugal image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of rmardis
rmardis

ASKER

i am causing errors when trying to use this with code for the three buttons.
can you give an example page using this funciton with textbox1,textbox2 and
textbox3.

Avatar of rmardis

ASKER

i took a while but i had a typo.  works great