View Single Post
Old 01-11-2013, 09:23 AM   PM User | #1
tpeck
Regular Coder

 
tpeck's Avatar
 
Join Date: Oct 2002
Location: Sydney, Australia
Posts: 780
Thanks: 41
Thanked 5 Times in 4 Posts
tpeck is on a distinguished road
redirect using javascript

I am trying to redirect a page to another using this code:

Code:
function GoToURL() {
var URLis = "http://google.com.au";
var location=(URLis);
this.location.href = location;
}
I felt sure it used to work. If conditions are right, you call the function GoToURL() and it changes the page to, in this case, google.

But now it doesn't work!

Is it obvious what is wrong?
__________________
The difference between genius and stupidity is that genius has its limits. (Albert Einstein)
tpeck is offline   Reply With Quote