N
newbiegalore
Hello everyone
,
Thanks to the gentle people on this group
for helping me out with previous issues. :-D This time round I am
facing what I perceive as a simple problem, which I have not found a
simple solution for (obviously!).
The problem: I need to pick up the URL in the address bar of a browser
when a link is clicked
What I have done: I have used,
a function which routes document.onclick into a func which uses
window.content.document.location.href to pick up the URL from the
address bar.
The issue: when I click link on the page the alert box displays the
URL in the address bar, not the address that I am planning to go to
when I click on the link. I tried to put in a delay before the address
bar content is picked up. I used setTimeout, a loop function but still
these only delay the picking up of the current URL in the address bar.
I thought that if I put in a delay, when I click a link, the URL in
the address bar would change and after 500 ms I could easily pick up
the destination URL.
Is there an elegant way to accomplish this? any pointers/comments/code
are very appreciated
. I have searched this group and have not
found an exact solution. Do I have to take control of the HTTP
channel? Also, If I want to block access to the link, providing the
user with some info before he/she actually views the page, how could I
do it? Any pointers?
Thanks in advance
Thanks to the gentle people on this group
for helping me out with previous issues. :-D This time round I am
facing what I perceive as a simple problem, which I have not found a
simple solution for (obviously!).
The problem: I need to pick up the URL in the address bar of a browser
when a link is clicked
What I have done: I have used,
a function which routes document.onclick into a func which uses
window.content.document.location.href to pick up the URL from the
address bar.
The issue: when I click link on the page the alert box displays the
URL in the address bar, not the address that I am planning to go to
when I click on the link. I tried to put in a delay before the address
bar content is picked up. I used setTimeout, a loop function but still
these only delay the picking up of the current URL in the address bar.
I thought that if I put in a delay, when I click a link, the URL in
the address bar would change and after 500 ms I could easily pick up
the destination URL.
Is there an elegant way to accomplish this? any pointers/comments/code
are very appreciated
found an exact solution. Do I have to take control of the HTTP
channel? Also, If I want to block access to the link, providing the
user with some info before he/she actually views the page, how could I
do it? Any pointers?
Thanks in advance