Get URL Address

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
User avatar
moiseszaragoza
Forum Commoner
Posts: 87
Joined: Sun Oct 03, 2004 4:04 pm
Location: Ft lauderdale
Contact:

Get URL Address

Post 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
nickvd
DevNet Resident
Posts: 1027
Joined: Thu Mar 10, 2005 5:27 pm
Location: Southern Ontario
Contact:

Post by nickvd »

Code: Select all

alert(document.location);
User avatar
moiseszaragoza
Forum Commoner
Posts: 87
Joined: Sun Oct 03, 2004 4:04 pm
Location: Ft lauderdale
Contact:

Post 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
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Last I checked, you're not told where the page is going.
Post Reply