I am posting this question to (hopefully) be answered by Smidgie82. [Hope that isn't against the rules, but Smidgie was very helpful on an earlier question, but didn't eventually solve it, so the points were awarded to someone else. This question is to allow me to more fully understand Smidgie's suggested technique, and also to award points I feel are appropriate for the effort they provided. Anyone may answer if they wish, but I will be biased to accept Smidgie's answer, so other people prefer not to waste time replying to this]
In response to an earlier question, Smidgie82 suggested the following lines.
myurl = "customlink"
for each i in document.GetElementsByName
i.href = myurl & i.href
What is 'aspLink'? Is that a keyword for something, or would I need to replace that with something from my page? Is this essentially a way of doing search&replace on all the href's in my document, so they are all preceded with the contents of my variable 'myurl'? If so, this sounds like a very handy technique.
When I have myurl="http:\\development.training.com\respond
test.asp?LogUser=" & user & "&LogSubject="
and <a href="../Source Files/Data Editing.mht" title="Data Editing" target="_new">
then it resolves into:
I have a line in my ASP that replaces "../" with "www.training.com\onlinecourse\fip\spider\source
files\", so I can see that it is using my ASP to resolve the resulting address, even before the hyperlink is clicked.
There is still something mysterious about this though.
When I use this approach, I end up seeing the correct page, in a new window, as desired. The problem I face is that the logging is not taking place. The ASP page should write a log entry on the basis of the querystring passed to the ASP, but this isn't happening.
I don't get any error messages at all, so it makes me wonder if perhaps what could be happening is that the ASP is being called only as far as determining what URL will result if it were run. This sounds unlikely, but it seems to fit what I am observing.
With this technique, does the ASP file still get executed in full?