Op 9-jul-09, om 19:01 heeft Ricardo J. Parada het volgende geschreven:

Just curious, are you wrapping the input field with an AjaxObserveField, or are you giving each field a unique ID and then using that with each AjaxObserveField's observeFieldID? If so, are they inside a repetition and do they all have a distinct ID?
I am giving each field a unique ID

Anyways, too many question huh? You may want to try the action binding in AjaxObserveField. Then your action should be called when the observer fires. Then the action that gets called could figure out what element to focus next and you could dynamically generate a script that focuses the input field you determine is next. If you have a repetition for example, and you use the index binding you could use that to figure out which row corresponds to the AjaxObserveField that triggered the update.
This is what i am doing. I generate dynamically my scripts:

<wo:AjaxObserveField observeFieldID = "$aantalcontrole" action = "$controleeraantal" fullSubmit = "$false" updateContainerID = "leveringlijnenID" onComplete = "$goPrijs" /> <wo:AjaxObserveField observeFieldID = "$prijscontrole" action = "$controleerprijs" fullSubmit = "$false" updateContainerID = "leveringlijnenID" onComplete = "$goProcent"/> <wo:AjaxObserveField observeFieldID = "$procentcontrole" action = "$controleerprocent" fullSubmit = "$false" updateContainerID = "leveringlijnenID" onSuccess = "$goAantal"/> and the generated script is something like: document.getElementById('myElement1').focus();
        But the onComplete/onSucces are executed every time.

Just ideas, not sure if they will work.


On Jul 9, 2009, at 12:51 PM, Frank Stock wrote:

Yes, that is what happens.

I have several order-lines, If the amount or the price or the discount is changing, I want the total to be recalculates.
So I've made 3 AjaxObserveFields for every order line.

Op 9-jul-09, om 18:44 heeft Ricardo J. Parada het volgende geschreven:


I thought only the AjaxObserveField that triggered the update would execute the onComplete script.

Are all the AjaxObserveFields inside the AjaxUpdateContainer calling their onComplete script?



On Jul 9, 2009, at 12:26 PM, Frank Stock wrote:

Hi,

I want to select the next field after an AjaxUpdate. The Ajaxupdate is triggered from an AjaxObserveField. But I see if I use 'onComplete' or 'OnSucces' that this is executed every time. So if I include OnSuccess="document.getElementById('myElement1').focus()", after the reload(AjaxUpdate), all the AjaxObserveField-elements will execute that, so always the last field is selected.
How can I solve that?

Thanks,
Frank Stock
Belgium

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/rparada%40mac.com

This email sent to [email protected]




 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to