| Issue 328: | Form Modal - Callback? | |
| 2 people starred this issue and may be notified of changes. | Back to list |
|
Is there a way assign a callback with returned data when the form has been
submitted?
I'm used to jquery.form where I can provide a callback to the success of a
form submission to then do other stuff with the returned data.
I spent hours last night trying to use only nyroModal's form submission.
Using
$.nyroModalManual({
url: 'some ajax with form code'
});
The Ajax loaded the form
<form class="nyroModal">
nyroModal then makes this a form that Submits via AJAX (this is cool BTW)
and shows the loading symbol on submission.
But afterwards, I had trouble returning data or calling script methods that
were on the main page. (I'm not using iFrames).
Anyways, a callback would be nice. :)
Oct 13, 2009
Any news about this issue?
Nov 8, 2009
(No comment was entered for this change.)
Status:
WontFix
Mar 1, 2010
Wow, it's been a long time since I've looked at my code. I guess the problem is hard to explain... I have three scripts I want to show in the modal: - image_upload.php - image_upload_receive.php - image_crop.php First, I open up with $.nyroModalManual the image_upload.php which contains <form class="nyroModal" action="image_upload_receive.php"> After the image is uploaded to image_upload_receive.php I just pass the name of the image. I then want to run $.nyroModalManual again to the url image_crop.php? image=image_name. Am I totally over thinking this? Should this be in an iframe? If I'm crazy, just let me know. :)
Mar 2, 2010
Just an FYI: I'm over thinking it. I'm going to make the image upload/crop into it's own pages. :) |
||||||||
instead of creating a new callback, you could simply add a callback to the complete ajax event like that: $.nyroModalSettings({ ajax: { complete: function(XMLHttpRequest, textStatus) { // do your stuff here. } } }); The ajax settings is used for basic ajax load and for form load.