Click to See Complete Forum and Search --> : Select Menu dynamically updates page


mattpont
01-29-2003, 03:50 AM
Hi all,

I am programming in php and mysql, and using a bit of javascript just for good measure.

I have a select menu which contains items from a database. I would like this select menu to dynamically update prices on a page (each individual menu item has different prices in the db).

Any suggestions/solutions would be greatly appreciated.

Thanks!

mattpont
01-29-2003, 06:59 AM
Well...

I have a select box. Below this I would like to display 3 different prices. I would like these prices to change depending on what is selected in the select box.

The db file contains:

ID: The value of the select option.
Name: The Name of the select option, i.e. what is displayed.
Price1:
Price2:
Price3:

mattpont
02-04-2003, 03:55 AM
I'm struggling to write the code for this.

Can anybody help? I am using Javascript and PHP...

I thankyou.

mattpont
02-04-2003, 04:19 AM
Hi Dave,

Thanks for your help.

I have managed to split the values into an array, but I cannot seem to get the innerHTML to work. How do I display a javascript variable using innerHTML?

mattpont
02-05-2003, 05:41 AM
Just a quick note to say that this worked like a charm.

Thanks Dave!