Hi!

I'm having major trouble with regards to having to work with inline
javascript-code generated by the Apache Wicket-framework for Java (as
you
can see under). Now in order to style the input properly I'm hiding it
and
using a anchor to trigger the hidden submit.

This works swell in 99% of the cases, but now we bumped into something
that
could possibly force us to redo the whole button-layout if we can't
get it
fixed

<!-- Submit with inline onclick-JS -->
<input id="savedb" class="positive save btn" type="submit"
onclick="var
wcall=wicketSubmitFormById('formda',
'../../?wicket:interface=:55:form:save::IActivePageBehaviorListener:
0:2&wicket:ignoreIfNotActive=true',
'save' ,null,null, function() {return
Wicket.$$(this)&&Wicket.$$('formda')}.bind(this));;; return false;"
value="Opprett" name="save" style="display: none;"/>

<!-- anchor that triggers the submit-element -->
..a id="savedb" class="submit positive save btn" href="#"..

<!-- JS to make the magic happen -->
//Buttons click-functionality
$('.btn.submit').click(function(){
        $(this).prev().click();
});

Somehow i -think- the submit is not triggering because of the
references to
(this) in the inline-code but i'm not sure. Anyone got a clue? I -
know- the click(function() hits the target, so the problem lies with
getting the inline onclick="" triggered

Reply via email to