Closed GoogleCodeExporter closed 8 years ago
This plugin doesn't actually submit the form at any point. And also doesn't
create or handle any events relating to form submission.
but it does override known plugins/functions that do.
Are you using the form plugin to submit via ajax?
If so you can pass the extra parameters as you normally would to the form
plugin.
If not, how are you submitting the form? A conventional click on a submit
button? Some other function?
Original comment by diego.a...@gmail.com
on 16 Mar 2012 at 12:53
Yes ,I used AjaxSubmit,also i am passing json data in data parameter.But i am
not able to receive that json data.
Original comment by MailToSu...@gmail.com
on 16 Mar 2012 at 2:01
Is there somewhere I can see your code in action? Or can you post the relevant
bits here?
Original comment by diego.a...@gmail.com
on 16 Mar 2012 at 2:04
Here is the code i am trying
$('#ajax-button').click(function () {
$('#frmUpload').ajaxSubmit({
data: {"x":-10753683.829803184,"y":4631949.57420643,"spatialReference":{"wkid":102100}},
success: function (r) {
$('#ajax-results').html(r);
$('input:file').MultiFile('reset');
}
});
});
Original comment by MailToSu...@gmail.com
on 16 Mar 2012 at 2:24
I guess the problem is this...
"spatialReference":{"wkid":102100}
You're passing an object where the form plugin expects a "key":"value" pair.
Removing this worked in my tests, can you give it a go?
Original comment by diego.a...@gmail.com
on 16 Mar 2012 at 3:01
Also note that, from my experience in ASP, it's no possible to post data along
with binary data. So depending on your server-side implementation, it may be
easier to achieve the same result by simply adding the additional data to the
action of the form and retrieving them on server from the query string.
ie.:
<form action="upload.something?extra=1&data=2&goes=3&here=4">
...
</form>
Original comment by diego.a...@gmail.com
on 16 Mar 2012 at 3:06
Yes,i think so.Thanks for your solution.
Original comment by MailToSu...@gmail.com
on 17 Mar 2012 at 5:05
Original comment by diego.a...@gmail.com
on 17 Mar 2012 at 7:34
Original issue reported on code.google.com by
MailToSu...@gmail.com
on 16 Mar 2012 at 12:37