Solved

Internet Explorer handling percentage encoded path

Posted on 2013-11-08
4
453 Views
Last Modified: 2014-01-03
I have written a SSRS report to return some results. The reason for the report is to find a specific file in a network share, and then be able to open the file via the network share.

One of the columns returns a hyperlinked Advanced Query Syntax query build up from the available data to make the AQS query results as specific as possible. The idea is to click on the hyper link and this would open a Windows Explorer window with "as specific" results as possible given the constructed query and utilize the windows search functionality.

The result of the AQS query look something like this:

search:query=filename_yyyymmdd_hhmm*.pdf&crumb=location:%5C%5Csharename%5Csubfolder%5Csubfolder%5C

Unfortunately the date/time section of the file name in the database table is slightly different (a few seconds either way) than the actual file name in the network share, hence search is used rather than the absolute path.

I successfully used the AQS query to find files in Windows Explorer and accessed the SSRS report via Firefox which exhibited the desired result, i.e. click the hyper link which opens a new Windows Explorer window (with the location specified from the AQS query) and the search text box populated with the search criteria from the AQS query.

Enter Internet Explorer … :(

It seems that once the hyper link is clicked Internet Explorer gets the AQS query "as is" but “corrects” the percentage encoded location sections (i.e. %5C%5C to \\ and %20 to ‘ ‘) and this “breaks” the AQS query since the location isn’t specified as it is with a windows share (i.e. “\\servername\share\file name” ) but rather with percentage encoded backslash and space values (i.e. %5C%5Cservername5%Cshare%5Cfile%20name).

When the hyper link is clicked the behaviour is as follows:

Internet Explorer - First box

 Internet Explorer - Second boxInternet Explorer - Final box
 

Is there any way to let internet explorer behave like firefox in this regard, i.e. open a Windows Explorer window and use the hyperlink “as is” and not “correct” the query?

Is there a better way to get the same end result?

Many thanks in advance.
0
Comment
Question by:Eric
  • 3
4 Comments
 
LVL 42

Expert Comment

by:Rob Jurd, EE MVE
ID: 39635292
In the link instead of using the href attribute, use some JavaScript via the onclick event.

E.g.

<a href="#" onclick="window.location='search:query=filename_yyyymmdd_hhmm*.pdf&crumb=location:%5C%5Csharename%5Csubfolder%5Csubfolder%5C'"> link to share</"a>
0
 
LVL 42

Expert Comment

by:Rob Jurd, EE MVE
ID: 39635380
Demo of it here: http://jsbin.com/ObAtUNu/2  does that exhibit the issue with the first link and not the second
0
 
LVL 42

Accepted Solution

by:
Rob Jurd, EE MVE earned 500 total points
ID: 39636075
failing that (i can't test it like you), you still retain the javascript but use the escape function to urlencode it again:

http://jsbin.com/ObAtUNu/2/

  <a href="search:query=filename_yyyymmdd_hhmm*.pdf&crumb=location:%5C%5Csharename%5Csubfolder%5Csubfolder%5C'"> link to share (href)</a>
  <br/>
  <a href="#" onclick="window.location='search:query=filename_yyyymmdd_hhmm*.pdf&crumb=location:%5C%5Csharename%5Csubfolder%5Csubfolder%5C'"> link to share (onclick)</a>
    <br>
  <a href="#" onclick="window.location='search:query=filename_yyyymmdd_hhmm*.pdf&crumb=location:'+escape('%5C%5Csharename%5Csubfolder%5Csubfolder%5C');"> link to share (onclick with escape)</a>

Open in new window

0
 

Author Closing Comment

by:Eric
ID: 39753623
Thanks for your help Rob, a lot of good information, much appreciated.
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
In this article, I will show you HOW TO: Install VMware Tools for Windows on a VMware Windows virtual machine on a VMware vSphere Hypervisor 6.5 (ESXi 6.5) Host Server, using the VMware Host Client. The virtual machine has Windows Server 2016 instal…
Google currently has a new report that is in beta and coming soon to Webmaster Tool accounts. This Micro Tutorial will highlight new features for Google Webmaster Tools.
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…

786 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question