Re: Notification of listbox selection change

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Dec 9, 2013 at 3:48 PM, Ashley Sheridan
<ash@xxxxxxxxxxxxxxxxxxxx> wrote:
> On Mon, 2013-12-09 at 15:40 -0500, Larry Martell wrote:
>> Is there any way in php to have a function be called when the value of
>> a listbox selection changes?
>>
>
> PHP is executed on the server, that select list is on the client side.

I know that. I thought perhaps there was some php construct that set
up some sort of Ajax request. I didn't think so,

> To detect a change of the select list, you would have to use Javascript.
>
> If there's something that absolutely has to be executed on the
> server-side from this change (like an email, or database update) then
> you could make an Ajax request to a PHP script. However, you've not said
> what it is you want to do, only how to do what you think you should,
> which are not the same things. If you explain in more detail what you're
> trying to achieve, then we could offer better help.

This is a mod to an existing app (that I didn't write)

Currently the user selects one item from a dropdown and clicks on a
submit button and they get a table of data based on their selection.
Via some javascript every 60 seconds the window is reloaded and the
table is updated (from the db which is changing).

What they want is a frame to the right of the table with a listbox
with all the choices (I have that coded.) When they select item(s)
from the listbox row(s) would get added to the table and when they
deselect items rows would be removed. They don't want to wait for the
next refresh nor have to click on a submit button.

Thanks.
-larry

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php





[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux