Javascript errors when navigating to a named anchor

P

Patrick Bates

We have a web application used on IIS 5/6 in classic ASP which has some
processing pages which redirect the user to a parameterized ASP page and use
a # tag in the URL to force a jump to a named anchor within the page.
Here's a sample URL:

http://localhost/esystems/timeclock/admin/emp_edit.asp?emp_id=1&#jobcat

This method has worked well with IE 5 and 6 on Windows 2000 and lower
systems. But today we learned of an issue with this and IE 6 on Windows XP.

Apparently when the page is loaded through this redirect, our Javascript
menus on the page will not operate, and return an error of Permission
Denied. To further complicate matters, refreshing the page with the anchor
reference still in the URL causes the page to jump to the anchor as expected
AND the Javascript will now work.

So this problem only occurs on the initial page load using a redirect with
#, only occurs with Windows XP, produces a Permission Denied error when
Javascript is used, but corrects itself if the page is refreshed.

Does anyone have any suggestions at all? At this point, they don't even
have to be good suggestions...
 
R

Robert Aldwinckle

....
So this problem only occurs on the initial page load using a redirect with
#, only occurs with Windows XP, produces a Permission Denied error when
Javascript is used, but corrects itself if the page is refreshed.


Sounds like it is a page which requires authentication?
Others have discovered that the hash that is being computed
for that is erroneously including the anchor into it; hence
the error message. See in particular, my reply to the OP
in this discussion and Splicer's link to some information
for Apache users:

http://www.microsoft.com/windows/ie...wser&mid=348fb784-0017-401d-af57-c4db2a8f4d9c

(Keyword for search: digest)


I wasn't aware of the refresh workaround. Thanks for that.
Presumably if you do a packet trace you will see then that
there is a different hash value for each request? I'd also
be curious to know if the Refresh causes a complete redownload
of the components or is just the necessary cache-checking
if they are all cacheable. Another way to answering the same
question would be to test: does Ctrl-F5 work as well?
If not you can assume that the basis of the workaround
is the cache-checking.


HTH

Robert Aldwinckle
---
 
P

Patrick Bates

I think I did a poor job explaining the problem. The server is not giving
me a Permission Denied error. The page loads and displays fine. This
appears to be entirely client-side, and only using IE6 on Windows XP. We
cannot reproduce the problem with IE6 on Windows 2000.

The problem occurs when you try to operate one of the JavaScript menus on
the page. When the JavaScript command attempts to fire we get the nice
pop-up script error box with an error of Permission Denied. Refresh the
page and the problems go away. Very strange...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top