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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T22:59:00+00:00 2026-05-21T22:59:00+00:00

I have a javascript function that builds an URI fragment using some captured parameters,

  • 0

I have a javascript function that builds an URI fragment using some captured parameters, and then submits my form.

Example:

function consultResource(contextName){
    var form = document.forms[0];
    var f1 = form.thename.value;//accepts strings without special symbols
    var f2 = escape(form.thedate.value); //accepts only strings in the form 'dd/mm/yyyy'
    var action = "/"+contextName+"/CtrlComparison?name="+f1+"&date="+f2;
    form.action = action;
    form.submit();
}

An example generated URI fragment would be
/MyContext/CtrlComparison?name=report01&date=06/05/2011

This snippet works, submitting the form and bringing a PDF document OK for:

  • Firefox 3.x-4.x (not tested on 2.x)
  • Internet Explorer 6-8
  • Google Chrome 9.x-11.x (other versions not tested)
  • Opera 10.x-11.x (other versions not tested)

But I need it to work in Internet Explorer 9 too. Currently when I submit the same info in IE9 I get the following message:
real result

instead of something like this:
expected result

IE9 is not escaping the / and taking them as part of path separators on URI.

The question is: How could I get my URI fragment to be correctly generated in IE9 too?

Thanks in advance.

  • 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-21T22:59:00+00:00Added an answer on May 21, 2026 at 10:59 pm

    This is not a problem with your form, or action URL. You need to send the correct headers when you write out the PDF.

    In your php
    header(“Content-disposition: attachment; filename:comparativoCajasRegistradas.pdf”);

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

Sidebar

Related Questions

I call a javascript function that dynamically builds <li> 's with a text input
I have an HTML form that builds a drop-down from json data that is
How do I modify this function that dynamically builds a drop down list so
I'm working on an ASP.Net app I have a drop down that, under some
I am developing a webapp for ipad and have come across an issue using
I'm building a mobile web app with jQuery Mobile and I have a problem.
I am trying to build a nice PHP framework for personal use. I realize
First time posting here after having great results searching for other answers on stackoverflow.
I'm trying to do something like the plugin found here: http://www.filamentgroup.com/lab/jquery_plugin_for_requesting_ajax_like_file_downloads/ does. I was
Sorry for long title but my concern is with constructing an ajax based application.

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.