Skip to main content
September 16, 2009
Answered

Dynamic use of more then one option box

Dear all,

I want to use several option boxes, where the options are selected form a MySQL database.

I've met several problems,

1. How do I get the selected option in a PHP and JS variable ($xyz=$_GET['field']) and (var xyz=form.field.Options.Selected)  doesn't seem to function.

2. The options of the second option box are selected with a SELECT Query, containing a where clause, using the selected option from the first option box.

Does somebody haves a clu?

Thank you in advance,

Cees from Holland

This topic is closed to new replies. Start a new post to keep the conversation going.
David_Powers
David_PowersCorrect answer
Inspiring
September 18, 2009

Yes.

3 replies

David_Powers
Inspiring
September 16, 2009

If you are using a Dreamweaver Dynamic List/Menu to display the options from a recordset, click the lightning bolt icon alongside the "Set value equal to" field in the Dynamic List/Menu dialog box, and select the recordset field you want to be used. See the following illustration:

To solve your second issue, you would need to use Ajax. Dreamweaver doesn't do it out of the box. Do a Google search for jQuery dependent drop down.

Translate
September 17, 2009

Thanks David,

Isn't possible to use the onChange handler to create AJAX functionality?

Regards,

Cees

Translate
David_Powers
David_PowersCorrect answer
Inspiring
September 18, 2009

Yes.

Translate