Hello everyone,
I'm having a problem here.
I'm using a HTML application to generate reports as htm-files.
Now I want to add a print function to make it all a bit easier.
So I came up with this:
-
function printfile(filetoprint)
-
{
-
var popup = window.open(filetoprint);
-
popup.focus();
-
popup.print();
-
popup.close();
-
}
-
You'll probably say: "Nothing wrong with that code." :-) Thank you, it is working fine
.
The problem lies however in my filename. When I wrote the code I added a # to the filename. The problem is now that when I try to open the file the browser tries to execute it, because he sees it as an anchor.
A small example of a filename: "F09-084 # status ().htm"
When I try to open it, the browser is looking for the file called F09-084 and nothing more.
I tried escaping the # and I tried encoding it %23 but no luck.
Does anyone have an idea how to open a file without having the browser look for the anchorpoint?
Regards,
Kenneth