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:

instead of something like this:

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.
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”);