Problem with URL

V

VK

TONI-BCN said:
I have a HTML page, for example http://www.mypage.html.

If I want to go to www.google.com, is some way to be able to recover
with Javascript "www.google.com"?

I have tried it with window.location, etc but she does not serve to me
since it shows "http:www.mypage.html to me".

If I uderstand you properly, you want to navigate from
http://www.myserver.com/mypage.html to http://www.google.com using
JavaScript ?

Then you may do it in this way:

window.location.href = "http://www.google.com";
 
R

Randy Webb

VK said the following on 11/30/2005 6:07 AM:
If I uderstand you properly, you want to navigate from
http://www.myserver.com/mypage.html to http://www.google.com using
JavaScript ?

Then you may do it in this way:

window.location.href = "http://www.google.com";

He wants to know where you are attempting to go before you leave the page.

You are on Page1.html and type in www.google.com in the address bar, he
wants to know that before you leave the page.

The answer is No unless they are leaving via a link on your page.
Otherwise, you have no reliable secure way of knowing where they are
going, only that they are going.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top