Skip to content Skip to sidebar Skip to footer

Problem With Window.open In Firefox

I have problem with downloading files in Firefox. I tried to find solution in old posts but I didn't find anything. I understand that solution is very simple, but I think today is

Solution 1:

URL don´t allow for backslashes.

If the file is located at \Files\test.zip on your windows webserver root the correct url to the file is http:///Files/test.zip

Solution 2:

Change the server side code to:

[System.Web.Services.WebMethod]
publicstaticstringTest()
{
    return"/Files/test.zip";
}

Web URLs should use forward-slashes instead of backslashes.

Solution 3:

In general you should use ResolveUrl method of the System.Web.UI.Control class. But in case of static method there is some workaround solutions.

Solution 4:

Replacing the following lines

[System.Web.Services.WebMethod]
publicstaticstringTest()
{
  return"\\Files\\test.zip";
}

with these might work...

[System.Web.Services.WebMethod]
publicstaticstringTest()
{
  return"\\\\Files\\test.zip";
}

Post a Comment for "Problem With Window.open In Firefox"