Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / HTML, CSS, Scripts / JavaScript / November 2005



Tip: Looking for answers? Try searching our database.

Problem with URL

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
TONI-BCN - 30 Nov 2005 10:32 GMT
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".  

Thank you very much
VK - 30 Nov 2005 11:07 GMT
> I have a HTML page, for example http://www.mypage.html.
>
[quoted text clipped - 3 lines]
> 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";
Randy Webb - 30 Nov 2005 12:28 GMT
VK said the following on 11/30/2005 6:07 AM:

>>I have a HTML page, for example http://www.mypage.html.
>>
[quoted text clipped - 11 lines]
>
> 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.

Signature

Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.