|
Posted by Larry L [in Honolulu] on 07/21/07 00:30
NC <nc@iname.com> wrote in news:1184973751.142209.176900
@d30g2000prg.googlegroups.com:
> On Jul 20, 4:07 pm, "Larry L [in Honolulu]" <la...@no-place.org>
> wrote:
>>
>> I have a dropdown list dynamically created in a form
>> by PHP from a MySql table. This is the only element
>> on the page. For some records there is only a single
>> selection, and if that's the case I'd like to just
>> post that and go to the next page. Is there a simple
>> way to do that using POST?
>
> Yes, but it's got nothing to do with PHP:
>
> <form method="POST" action="[your_action_goes_here]">
> <select name="mySelect" id="mySelect"
> onChange="mySelect.form.submit()">
> <option value="">Select an option
> <option value="1">Option 1
> <option value="2">Option 2
> <option value="3">Option 3
> <option value="4">Option 4
> </select>
> </form>
>
> Cheers,
> NC
Well thanks, but maybe I didn't explain it well enough. I have pretty
much exactly what you show, but sometimes when the page loads, and the
options list is created, there is only one item there. If that's the
case, then I don't want to even show it, I just want the one option
posted to the next page.
Larry
[Back to original message]
|