Note that there are some explanatory texts on larger screens.

plurals
  1. POSubmit with JQuery in firefox 3 & opera in a modal dialog box from SimpleModal
    text
    copied!<p>I'm trying to submit a form who is rendered in a SimpleModal dialog, but my submit is never called when I'm using FF3 &amp; Opera (Chrome, Safari and IE works). I use the following code:</p> <pre><code>function ShowModal(rendercontainerid, modalcontainerid, url) { if (url == '') return; $.get(url, function(data) { $(rendercontainerid).html(data); $(rendercontainerid).modal({ close: false, containerId: modalcontainerid, onOpen: function(dialog) { dialog.overlay.fadeIn('slow', function() { dialog.container.slideDown('slow', function() { dialog.data.fadeIn('slow'); }); }); }, onClose: function(dialog) { dialog.data.fadeOut('slow', function() { dialog.container.slideUp('slow', function() { dialog.overlay.fadeOut('slow', function() { $.modal.close(); // must call this! }); }); }); } }); }); } function CloseDialog() { $.modal.close(); } function SubmitAndClose(rendercontainerid) { $(rendercontainerid).find('form').submit(); CloseDialog(); window.location = window.location; } function AjaxSubmitAndClose(rendercontainerid) { var form = $(rendercontainerid).find('form'); var url = $(form).attr('action'); var postData = $(form).serializeArray(); var options = { dataType: 'json', success: AjaxSubmitSucces }; $(form).ajaxSubmit(options); } function AjaxSubmitSucces(data) { if (data.ErrorMessage != '') { alert(data.ErrorMessage); } else if (data.RedirectUrl != '') { CloseDialog(); window.location = data.RedirectUrl; } } </code></pre> <p>I also tried to the jquery.form plugin for ajax posting but then you will see the formdata(An fckeditor) is in the initial values(it looks like it is cached).</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload