Do you perhaps see a JavaScript error in Firebug?
Could you try renaming SubmitLink to another value such as "login"?
I recall JavaScript form submits having problems if an element is named
"submit".
Let me know if that works for you.
kind regards
bob
On 14/01/2010 12:09 AM, getagrip wrote:
Hi,
I'm having problems using the SubmitLink.
### Login.java ###
SubmitLink submit = new SubmitLink("submit", "Submit", this, "onSubmit");
form.add(submit);
### html ###
${loginform.fields.username}
${loginform.fields.password}
${loginform.startTag()}
${loginform.fields.submit}
${loginform.endTag()}
The link gets rendered as:
http://localhost/page/login.htm?actionLink=Submit
But neither a form gets submitted nor does the "onSubmit" callback get
called.
Regards, getagrip
Bob Schellink wrote:
Hi,
Is SubmitLink what you are after?
http://incubator.apache.org/click/docs/extras-api/org/apache/click/extras/control/SubmitLink.html
kind regards
bob
On 13/01/2010 11:09 PM, getagrip wrote:
Hi,
is there any to add a callback to a text-based href submit?
We cannot work with buttons/images so our forms have to be submitted
like this:
<a href="javascript:document.loginform.submit();">Login</a>
Unfortunately I cannot find any hints on how to do this programmatically
via the framework. Maybe in combination with an ActionLink? But this
would just call a Page and not submit the form I guess.
Cheers, getagrip