You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Marco Aurélio Silva <ma...@gmail.com> on 2007/12/26 14:21:07 UTC

SubmitLink on Firefox

Hi
I'm trying to use a SubmitLink to submit a form, but it is not working on
Firefox. I get the follow message:

f.submit is not a function

Inspecting the code generated by wicket, I noticed that on firefox the call
to line 9 ( f.submit() ) is calling the element "e", because the instruction
on line 2.

1 var e=document.getElementById('form:hf:0');
2 e.name='submit';
3 e.value='x';
4 var f=document.getElementById('form');
5  if (f.onsubmit != undefined) {
6  if (f.onsubmit()==false)
7 return false;
8 }
9 f.submit();
10 e.value='';
11 e.name='';return false;"


Is this a know bug? Is there a way to make this work on Firefox?

Thank you
Marco

Re: SubmitLink on Firefox

Posted by Matej Knopp <ma...@gmail.com>.
Hi,

this should already be fixed in trunk.

-Matej

On Dec 26, 2007 2:29 PM, Marco Aurélio Silva <ma...@gmail.com> wrote:
> The problem was on the submitLink ID. I was using the ID "submit". Changing
> the id to "submitButton" solved the problem.
>
> Thank you
> Marco
>
>
> On Dec 26, 2007 10:21 AM, Marco Aurélio Silva <ma...@gmail.com> wrote:
>
> > Hi
> > I'm trying to use a SubmitLink to submit a form, but it is not working on
> > Firefox. I get the follow message:
> >
> > f.submit is not a function
> >
> > Inspecting the code generated by wicket, I noticed that on firefox the
> > call to line 9 ( f.submit() ) is calling the element "e", because the
> > instruction on line 2.
> >
> > 1 var e=document.getElementById ('form:hf:0');
> > 2 e.name='submit';
> > 3 e.value='x';
> > 4 var f=document.getElementById('form');
> > 5  if (f.onsubmit != undefined) {
> > 6  if (f.onsubmit()==false)
> > 7 return false;
> > 8 }
> > 9 f.submit();
> > 10 e.value='';
> > 11 e.name='';return false;"
> >
> >
> > Is this a know bug? Is there a way to make this work on Firefox?
> >
> > Thank you
> > Marco
> >
>

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


Re: SubmitLink on Firefox

Posted by Marco Aurélio Silva <ma...@gmail.com>.
The problem was on the submitLink ID. I was using the ID "submit". Changing
the id to "submitButton" solved the problem.

Thank you
Marco

On Dec 26, 2007 10:21 AM, Marco Aurélio Silva <ma...@gmail.com> wrote:

> Hi
> I'm trying to use a SubmitLink to submit a form, but it is not working on
> Firefox. I get the follow message:
>
> f.submit is not a function
>
> Inspecting the code generated by wicket, I noticed that on firefox the
> call to line 9 ( f.submit() ) is calling the element "e", because the
> instruction on line 2.
>
> 1 var e=document.getElementById ('form:hf:0');
> 2 e.name='submit';
> 3 e.value='x';
> 4 var f=document.getElementById('form');
> 5  if (f.onsubmit != undefined) {
> 6  if (f.onsubmit()==false)
> 7 return false;
> 8 }
> 9 f.submit();
> 10 e.value='';
> 11 e.name='';return false;"
>
>
> Is this a know bug? Is there a way to make this work on Firefox?
>
> Thank you
> Marco
>