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 3493258
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T11:51:38+00:00 2026-05-18T11:51:38+00:00

I have an html/javascript frontend that is using JQuery’s AJAX request to send XML

  • 0

I have an html/javascript frontend that is using JQuery’s AJAX request to send XML containing user-entered form data to a backend application which in turn creates a PDF from that information. The frontend receives a UUID in response, which it then uses in the download url to download the generated PDF.

This works wonderfully in Firefox and Safari, but is being blocked by Internet Explorer 8’s protection against scripted downloads. Telling IE8 to download the file via the spawned Information Bar forces a reload of the page, which blanks out all of the entered user content.

A single onMouseUp event on a button-esque element is triggering the generation of the XML to send, sending the XML, getting its response, then initiating the download via setting the url in the window.location object. Separating out that download into a different button (having one generate and send the xml and fetch the UUID, and the other only initiate the download using the url made from the UUID) bypasses the information bar but ruins the simplicity and intuitiveness of the interface.

Here are the relevant javascript functions:

function sendXml()
{
    var documentXml = generateDocumentXml();
    var percentEncodedDocumentXml = escape(DocumentXml);
    var url = "generate?document=" + percentEncodedDocumentXml;
    $.ajax({
        url: url,
        type: "GET",
        dataType: "xml",
        success: function (xml)
        {
            var uuid = $(xml).find('uuid').text();
            getPdf(uuid);
        },
        error: function (xhr)
        {
            alert("There was an error creating your PDF template");
        }
    });
}

function getPdf(uuid)
{
    var url = "generate?get-pdf=" + uuid;
    window.location = url;
}

I’m fishing for suggestions about how to best handle this issue. My first preference would be to have the information bar not interfere at all, but minimizing its harm would be a dramatic improvement over the current situation. If it could not reload and wipe the frontend interface, and actually proceed to downloading the file when the user chooses to “Download File…” via the Information Bar’s menu, that would help.

  • 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-18T11:51:39+00:00Added an answer on May 18, 2026 at 11:51 am

    I tested it and the reason for the bar to occur seems to be the fact, that there is no direct relation between the user-action(mouseover) and the loading of the URL(guess a PDF-file).

    This workaround will solve the issue:

    Create an iframe(may be hidden) inside the document and use

    window.open(url,'nameAttributeOfTheIframe') 
    

    …to load the PDF. The bar occurs too, but if the user chooses to download, the current document will reload too, but the user-content(if you mean form-data) will remain, as the bar belongs to the iframe not to the parent document.

    Be sure to send a attachment-header with the PDF too, to beware of showing it inside the browser(if the browser is able to), because if you use a hidden iframe the user cannot see what’s loaded there.

    <iframe name="nameAttributeOfTheIframe" style="display:none"></iframe>
    <input type="button" value="click here"  onclick="f1()"/>
    <input value="default value">
    <script type="text/javascript">
    <!--
    function f1()
    {
       //simulate delayed download
       setTimeout(f2,1000)     
    }
    
    function f2()
    {
      window.open('http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-262.pdf','nameAttributeOfTheIframe');      
    }
    
    document.getElementsByTagName('input')[1].value='this is modified value, should remain';
    
    //-->
    </script>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an html table containing values that are being generated from javascript. How
I have HTML which includes scripts in following order <script src=../static/js/jquery.js type=text/javascript> <script src=../static/js/bootstrap.js
I have a HTML that includes a Javascript file. This script contains a special
I have a html/javascript web page that I need to run unmodified on APEX
I have a relatively simple HTML / JavaScript form. Such as this: <form method='POST'
I have a javascript array: var exclude = [Santorum,Obama,Romney,Gingrich]; I have html links: <a
I am developing an application with sdk 3.1 - html/javascript/scenes. i have an iframe
I have a html + css + javascript application. I want to be able
I have an html page with a single-line javascript comment as follows: // {key1:value1},
I have simple HTML code with some JavaScript. It looks like: <html> <head> <script

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.