Click to See Complete Forum and Search --> : Capture HREF value and redirect afterwards


goodson007
11-06-2003, 10:17 AM
Here is what I am trying to accomplish. I want to capture the click event and whatever the URL they clicked will be stored. An invisible layer will show up and if they choose to close the layer, the page is then redirected to wherever they initially wanted to go.

Is this possible? I am able to capture the click event and stop the page from navigating to the requested URL. However, I do not know how to store where they wanted to go initially and redirect afterwards.

Any help is greatly appreciated.

Have a great day and thanks for any assistance.

Khalid Ali
11-06-2003, 10:25 AM
use something along these lines

<a href="somelink.html" onclick="return process(this.href); return false;">Click</a>

whre you rprocess function may look like this

function process(url){
show the layer here
if(thecy close the layer){
window.location.href=url
}
else return false;
}

goodson007
11-06-2003, 10:28 AM
That would be great... however, it has to be without the use of changing the '<A>' tags. I just have to capture the HREF when the user clicks.

Any other suggestions?