Found this one in unsent messages too...
Sylvain Wallez wrote:
> Upayavira wrote:
>
>> Joerg Heinicke wrote:
>>
>>> On 15.01.2004 23:34, Upayavira wrote:
>>>
>>>> I'd like to have an on-change event actually submit the form,
>>>> rather than just execute the <wd:on-value-changed> javascript code.
>>>>
>>>> How can I do this?
>>>>
>>>> Otherwise, the on-value-changed javascript doesn't have access to
>>>> the local variables of the main flowscript, which I need to
>>>> repopulate my form for redisplay. (I know I can get hold of the
>>>> bizObject from the request attribute, but it all seems rather hard
>>>> work to use it there. There's an elegance I'm missing).
>>>
>>>
>>>
>>> You changed the woody stylesheet for the radio buttons, so you
>>> already came across @submit-on-change. Why not using the same for a
>>> field?
>>
>>
>>
>> Because it goes back to the server, yes, but doesn't actually leave
>> the showForm function, which is what I'm after.
>
>
>
> Currently, the only widgets that can potentially automatically exit
> showForm are <wd:submit> widgets. "Potentially" since of course the
> form is redisplayed if validation is asked and fails.
>
> The Form object has a endProcessing(boolean redisplayForm) method that
> could be use in the <wd:on-value-change> to achieve this.
>
> Sylvain (currently swamped)
event.source.parent.endProcessing(false) did the trick. And your email
came in literally seconds before I went to get on the Tube, when I'd be
wanting to use this. So your timing was absolutely perfect! Thanks!
Upayavira, also swamped, with a site to have live by Wednesday
|