Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3316894
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T22:31:23+00:00 2026-05-17T22:31:23+00:00

Have a set of prototype-enabled ajax code that is working in all browsers other

  • 0

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.

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) {
...
}

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.

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…

{"question": ["Enter your question*"], "name": ["Enter your name (First L.)*"], "sender": ["Enter your e-mail*"]}

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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T22:31:24+00:00Added an answer on May 17, 2026 at 10:31 pm

    This problem has been solved. Crazy issue here but it turns out that there was a javascript error that was preventing the script from executing and the standard form submit was occurring thru the browser thus returning AJAX code as a file download prompt. The form was designed in such a way that javascript-disabled browsers would still be able to use the form without ajax using a hidden input field with name “js”. The javascript would blank the value of this field when submitting via AJAX to let server know the response should be JSON and not a full page refresh. Well, that part of the javascript that blanked the js field value processed normally but then the script errored out and thus the event.stop() javascript never executed. Resulting in the form being processed as a standard Submit button click, POST request through browser.

    Note in the code above…

    askForm = $('askForm');
    

    which clearly should be…

    var askForm = $('askForm');
    

    Thanks to the browsers that allowed this syntax but it sent me on an IE8 wild goose chase as a result. Always learning.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

No related questions found

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.