Dynamic Printing of Values

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View


We have a combo box on our page, which gets populated via a MySQL

What we want to do is to print the values on the page in a table that
correspond the to selection from the combo box without a page refresh.

I assume that I'll need to query ALL the needed values from the
database and store them in an array.  Drawing the combo box is not a
problem.  But, once a selection is made, how do I print the values to
the page?

I'm assuming an 'on change' events needs to be attached to the box,
but, it is not a form, so, there would not be any submit to the
server.  How do we print the values from the selection made?  Would it
have to be javascript rather than PHP.

If yes, I'll go post there.....


Re: Dynamic Printing of Values

Quoted text here. Click to load it

Yes -- ask a Javascript newsgroup.

Re: Dynamic Printing of Values

Mtek a écrit :
Quoted text here. Click to load it
You're completely right, so this is not the right newsgroup.

- onchange triggers on any change, no need for a submit button. You just
need to handle the default "null" value, since your first option cannot
be a value, else one would have to select an other value then come back
on the first to display the info.
- selectedIndex is your (js) key for Google :)

If you can't make your way with this, well you know where to post to get
a detailed answer at least :)


Site Timeline