Note that there are some explanatory texts on larger screens.

plurals
  1. POProblem with Prototype Ajax.Request in Internet Explorer 8 prompting file download
    primarykey
    data
    text
    <p>Have a set of prototype-enabled ajax code that is working in all browsers other than IE. In IE8 the JSON, that otherwise gets returned to the onSuccess handler function specified in Ajax.Request, gets thrown into a file download stream which pops up and prompts for where to download. </p> <pre><code>askForm = $('askForm'); var askUrl = '.'; var askParameters = askForm.serialize(true); askForm.disable(); var askAjax = new Ajax.Request( askUrl, { method: 'post', parameters: askParameters, onSuccess: handleResults, onFailure: handleError } ); function handleError(transport) { alert('Please refresh this page, an error occurred in processing at the server.'); } function handleResults(transport) { ... } </code></pre> <p>There is more code in the handleResults function but this never gets called. Having debugged, the download prompt occurs when the Ajax.Request function is called. </p> <p>The filename IE8 prompts to download changes each time, 4 seemingly random hex values (8 characters) with no filename extension. And the contents of the file are the pure JSON response from the server...</p> <pre><code>{"question": ["Enter your question*"], "name": ["Enter your name (First L.)*"], "sender": ["Enter your e-mail*"]} </code></pre> <p>Would be much obliged for any tips here. This is occurring on Snow Leopard with IE8 running in VMWare Fusion accessing a site running via apache/django/python on OS X. However, since Chrome and Firefox in the VMWare Windows XP machine function properly, seems to point directly to IE8 as the culprit. </p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

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