Re: Triggering AjaxObserveField through javascript
Re: Triggering AjaxObserveField through javascript
- Subject: Re: Triggering AjaxObserveField through javascript
- From: Tobias Janz <email@hidden>
- Date: Wed, 08 May 2013 07:03:20 +0200
Hi Taylor,
i was wrong, sorry. the problem with the "myAjaxIDUpdate()" is that it will do a "get" not a "post".
2 other solutions:
1. Add an AjaxObserveField to the List, which is updating all. At the AOF set fullSubmit=true. Add an onChange to the List, where you call your _javascript_ to set the values.
Something like this:
ListForAll: <wo:popUpButton id="list3" list = "$myList" item = "$listItem" selection = "$listForAllSelection" _onChange_ = "document.getElementById('list1').setValue('2'); document.getElementById('list2').setValue('2');" noSelectionString = "---"/>
<wo:AjaxObserveField observeFieldID = "list3" updateContainerID = "myAjaxID" fullSubmit = "$true" />
2. And this is what I would do: Add an AjaxObserveField like above, but with an action then you can set the value in your JavaCode. Example:
ListForAll: <wo:popUpButton id="list3" list = "$myList" item = "$listItem" selection = "$listForAllSelection" noSelectionString = "---"/>
<wo:AjaxObserveField action = "" observeFieldID = "list3" updateContainerID = "myAjaxID" fullSubmit = "$true" />
public WOActionResults setValuesFromListForAll() {
setList1Selection("SelectForAll");
setList2Selection("SelectForAll");
return null;
}
Hope this helps.
Tobias
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden