probelm with script inside ok function in a a dialog
I have a submit button with onclick script which works now I wanted to show jquery dialog and on click Ok execute the button script
here is the button
- <input style="margin-top: 1em;" type="submit" value="ADL" class="submitbutton ui-button ui-widget ui-state-default ui-corner-all" wicket:id="adl" name="noFindingGroupsBtnsContainer:adl" id="adl2b3" onclick="var wcall=wicketSubmitFormById('reviewForm2b0', '?x=Dey9PT2gy1YuenfaMGBagUANwBRKlaVd5huPWU-oPNBYUDs*nz1v8hztWlx3FiLFwcq1iD0dcAtS0IBc-6h9fgMeoyFtWfNxH**95XJRikj9MY-Lk6b*ifDHBe9eO93BddF814Ut612AETOd4t7ing', 'noFindingGroupsBtnsContainer:adl' ,function() { }.bind(this),function() { }.bind(this), function() {return Wicket.$$(this)&&Wicket.$$('reviewForm2b0')}.bind(this));;; return false;" role="button" aria-disabled="false">
I changed this to so that dialog appears on on click Ok execute dfunction for button
- <input type="submit" class="smallbutton ui-button ui-widget ui-state-default ui-corner-all" wicket:id="delete" value="Delete" name="delete" id="delete2cd" onclick="
-
- $('body').append('<div id='+'confirm-dialog'+'><span>Are you sure you want to delete?</span><div/>');
- $('#confirm-dialog').dialog({
- modal: true,
- autoResize:true,
- title: 'Please confirm!',
- buttons: {
- OK: function() {
- $(this).dialog('close');
- var wcall=wicketSubmitFormById('datesForm2c8', '?x=CSnkdaEqQF8FdQmRO3bFeuUnAbwwynRD4SmMkMYG2NJadMCSz3AJvOlIUpYFknY*AhBogq0tknoAAc3O7DZ7EU5mAksRg*T7AFItkFMidvtSlMpDYVY02A', 'delete' ,function() { }.bind(this),function() { }.bind(this), function() {return Wicket.$$(this)&&Wicket.$$('datesForm2c8')}.bind(this));;; return false;
- },
- Cancel: function() {
- $(this).dialog('close');
- }
- },
- close: function (ev, ui) {
- $(this).dialog('destroy');
- $(this).remove();
- }
- });
- $('#confirm-dialog').dialog('widget').zIndex(25000);
- $('#confirm-dialog').dialog('open');
- return false;
-
- " role="button" aria-disabled="false">
the problem is after I click the ok button on dialog the function is getting executed but its something wrong becasue of whihc the form is not posted to server. I can understand that without the script for
wicketSubmitFormById it wont be easy to understand my problem .
Thanks