I\'m trying to submit a form with a file
field in it via jQuery.Form plugin, here\'s the code:
$(\'form\').ajaxSubmit({
url: \"/path\",
data
I came up with the following workaround (in Zend Framework):
if (!$this->_request->isXmlHttpRequest()) {
die('<textarea>'.Zend_Json::encode($data).'</textarea>');
}
$this->view->assign($data);
Just set Content-Type: text/html
This happens because IE8 doesn't recognize application/...
mimetype.
This works for me.
Hope it helps.
if you work with Zend you can do
$this->getResponse()->setHeader('Content-Type', 'text/html');
in your controller action. and on client-side, in case of jQuery, you can do
data = $.parseJSON(data);