Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Internet Explorer handling percentage encoded path

Posted on 2013-11-08
4
Medium Priority
?
461 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
4 Comments
 
LVL 43

Expert Comment

by:Rob
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 43

Expert Comment

by:Rob
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 43

Accepted Solution

by:
Rob earned 2000 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

The Ideal Solution for Multi-Display Applications

Check out ATEN’s VS1912 12-Port DP Video Wall Media Player at InfoComm 2017. Kerri describes how easy it is to design creative video walls in asymmetric layouts and schedule detailed playlists ahead of time with its advanced scheduling feature.

Question has a verified solution.

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

Windows 10 Creator Update has just been released and I have it working very well on my laptop. Read below for issues, fixes and ideas.
Ever visit a website where you spotted a really cool looking Font, yet couldn't figure out which font family it belonged to, or how to get a copy of it for your own use? This article explains the process of doing exactly that, as well as showing how…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…

705 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