Has anyone used a SAEF with nGen/MX Univeral Editor to upload images via a modalbox? I’ve got something in place at the moment, but have two problems:
1. After submitting the form, the page that you get returned to gets loaded inside the modalbox (I’m using Fancybox for jQuery), so you have one version of the page loaded into a modalbox over the same page.
2. The entry gets created, but the image doesn’t get uploaded. The same form submitted on the page, rather than via the modalbox works OK though.
The code which I took from the Fancybox website looks like:
$(".fancy a").fancybox({
'scrolling' : 'no',
'titleShow' : false,
'onClosed' : function() {
$("#error").hide();
}
});
$("#entryform").bind("submit", function() {
if ($("#title").val().length < 1) {
$("#error").show();
$.fancybox.resize();
return false;
}
$.fancybox.showActivity();
$.ajax({
type : "POST",
cache : false,
url : "/page-the-form-is-on/",
data : $(this).serializeArray(),
success: function(data) {
$.fancybox(data);
}
});
return false;
});