Solved

Internet Explorer handling percentage encoded path

Posted on 2013-11-08
4
459 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 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

Want Experts Exchange at your fingertips?

With Experts Exchange’s latest app release, you can now experience our most recent features, updates, and the same community interface while on-the-go. Download our latest app release at the Android or Apple stores today!

Question has a verified solution.

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

Originally, this post was published on Monitis Blog, you can check it here . Websites are getting bigger and more complicated by the day. Video, images and custom fonts are all great for showcasing your product or service. But the price to pay in…
I was prompted to write this article after the recent World-Wide Ransomware outbreak. For years now, System Administrators around the world have used the excuse of "Waiting a Bit" before applying Security Patch Updates. This type of reasoning to me …
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…
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…
Suggested Courses

623 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