i think in this case we should define the undefined to be true...

-igor

On Fri, Sep 16, 2011 at 5:56 AM, Martin Grigorov <mgrigo...@apache.org> wrote:
> it seems in your code you have <form onsubmit="something();"> without
> returning anything. Since 'if (undefined)' is 'false' the call stops
> there.
>
> On Fri, Sep 16, 2011 at 3:25 PM, Wayne W <waynemailingli...@gmail.com> wrote:
>> and in what case does it not return anything?
>>
>>
>> On Fri, Sep 16, 2011 at 5:04 PM, Martin Grigorov <mgrigo...@apache.org> 
>> wrote:
>>> It should return true or false.
>>> False if there is some reason to not submit the form, for example
>>> client side validation failed.
>>> True if everything is OK and the submit can proceed.
>>>
>>> On Fri, Sep 16, 2011 at 6:21 AM, Wayne W <waynemailingli...@gmail.com> 
>>> wrote:
>>>> Hi,
>>>>
>>>> I'm trying to upgrade from 1.4.8 to 1.4.18 and I'm finding that
>>>> AjaxSubmitLink is not working  (at least with one form).
>>>>
>>>> The form doesn't get submitted - the problem in wicket-ajax.js is (~line 
>>>> 1120):
>>>>
>>>> // Submits a form using ajax.
>>>>        // This method serializes a form and sends it as POST body.
>>>>        submitForm: function(form, submitButton) {
>>>>                var submittingAttribute = 'data-wicket-submitting';
>>>>                if (form.onsubmit && 
>>>> !form.getAttribute(submittingAttribute)) {
>>>>                        form.setAttribute(submittingAttribute, 
>>>> submittingAttribute);
>>>>                        var retValue = form.onsubmit();
>>>>                        form.removeAttribute(submittingAttribute);
>>>>                        if (!retValue) return;
>>>>                }
>>>>
>>>>
>>>> The problem is var retValue = form.onsubmit(); does not return any
>>>> value (retValue remains undefined) and hence it returns and doesn't do
>>>> the submit. I don't know enough about javascript to really understand
>>>> whats happening here. The form is fairly unremarkable.
>>>>
>>>> For now I've patch the wicket-ajax.js code and comment out the return,
>>>> and it works fine again. I notice this code here was not in 1.4.8. But
>>>> obviously this is not the solution.
>>>>
>>>> So I imagine it something to do with the form, but I don't know where
>>>> to start and look - what is normally returned by form.onsubmit();?
>>>> what can I look for?
>>>>
>>>> many thanks
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>>>> For additional commands, e-mail: users-h...@wicket.apache.org
>>>>
>>>>
>>>
>>>
>>>
>>> --
>>> Martin Grigorov
>>> jWeekend
>>> Training, Consulting, Development
>>> http://jWeekend.com
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>>> For additional commands, e-mail: users-h...@wicket.apache.org
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>
>
>
>
> --
> Martin Grigorov
> jWeekend
> Training, Consulting, Development
> http://jWeekend.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to