Page 1 of 1

Get URL Address

Posted: Tue Feb 06, 2007 11:04 am
by moiseszaragoza
I was wandering if there is any way that I can have a alert show up when you type in a URL?

the alert should read ("you are going to ADDRESS_TYPED

Posted: Tue Feb 06, 2007 11:21 am
by nickvd

Code: Select all

alert(document.location);

Posted: Tue Feb 06, 2007 11:29 am
by moiseszaragoza
Thanks that helped a bit

I did

Code: Select all

<body  onUnload="UnLoad()"> 

Code: Select all

function UnLoad(){
	alert(document.location);
}
but the problem is that i get the address were I am and not the one that i typed

Thanks for your help

Posted: Tue Feb 06, 2007 5:14 pm
by feyd
Last I checked, you're not told where the page is going.