On Thu, 06 Mar 2008, hjuturu wrote:
> I have a form in my html page . I am trying to simulate form submit from  
> tag using onclick="document.myForm.submit();". The onSubmit() method my
> wicket class doesnt get called when i do this. Do i have to use <input
> type="submit"/> to achieve this. i am using   tag so that i can style the
> buttons as required.

Do you get a JavaScript error?

> <form wicket:id="myForm" id="myForm" method="post" style="margin:-5px 0px
> 0px 10px;">
> <br>
> <div>
>     <label>To [Email]:</label><br><input type='text' wicket:id="to"
> style="width:250px"/>
> <div>
>  document.myForm.submit();">Submit  
> </div>

Probably Wicket overwrites the id of the form, and you should
explicitly call

  form.setOutputMarkupId(true).setMarkupId("myForm");

Best wishes,
Timo

-- 
Timo Rantalaiho           
Reaktor Innovations Oy    <URL: http://www.ri.fi/ >

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to