[Cartoweb-dev] New Plugin with Dropdown

Oliver Christen oliver.christen at camptocamp.com
Wed Oct 24 10:07:33 EDT 2007


well, onchange only trigger whatever function you want.
the usual one being FormItemSelected() to simply post the form.
other action are only case by case so there is no specific documentation for 
that.


> Hi,
>
> the reason is, that I copied it without thinking :-/ Well I found it out
> some one minute before I received this mail.... Sorry. But is there any
> documentation about the possible onchange values? That might be
> interesting anyway.
>
> Regards
> Carolin
>
> Oliver Christen wrote:
>> Hi
>>
>> posted.value=0 means handleHttpPostRequest will NOT be triggered. This
>> is hardcoded somewhere.
>>
>> any reason why are you setting this value to 0 ?
>>
>> regards
>> Oliver
>>
>>
>>
>>> Hi,
>>>
>>> thanks, I will also do that :-) But I have another question. In
>>> cartoclient.tpl I defined the dropdown with the following onchange
>>> value:
>>>
>>> javascript:document.carto_form.posted.value=0;FormItemSelected();
>>>
>>> It seems, that this action does not trigger the handleHttpPostRequest
>>> method in my plugin... I added some debug output and I see that this
>>> method will not be executed if I select something in the menu. But if I
>>> load another plugin, which also implements the handleHttpPostRequest
>>> method and trigger it, the dropdown-plugin's handleHttpPostRequest will
>>> also be executed. The latter behavior makes sense, but the first one
>>> indicates that I chose the wrong onchange value, doesn't it?
>>>
>>> Regards
>>> Carolin
>>>
>>> Oliver Christen wrote:
>>>> Hi
>>>>
>>>> "drawing" interface content is done via renderForm
>>>> handling a action is done via
>>>> handleHttpGetRequest/handleHttpPostRequest
>>>>
>>>> it doesnt matter if you do it with one or two plugin, though I would
>>>> preferably do it in one, simply to keep related logic together.
>>>>
>>>> regards
>>>> Oliver
>>>>
>>>>> Hi all,
>>>>>
>>>>> I think, my question has to go to this list, not to the user list, but
>>>>> I'm not sure about it.
>>>>>
>>>>> I created a dropdown menu in a plugin, which should be used to select
>>>>> something, which then triggers an action according to the selection.
>>>>>> From my understanding, "drawing" the dropdown menu and handle the
>>>>> selection should be different plugins... Can somebody confirm this? Or
>>>>> is there a possibility to "draw" the menu and handle the user's
>>>>> selection within the same plugin?
>>>>>
>>>>> Regards
>>>>> Carolin
>>>>> _______________________________________________
>>>>> Cartoweb-dev mailing list
>>>>> Cartoweb-dev at lists.maptools.org
>>>>> http://lists.maptools.org/mailman/listinfo/cartoweb-dev
>>>>>
>>>>
>>>
>>>
>>
>
> 



More information about the Cartoweb-dev mailing list