How to get the URL?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • ASK

    How to get the URL?

    Hi,

    I am new to Javascript.
    I have registered 3 domain names (www.web-1.com , www.web-2.com and
    www.web-3.com and all the 3 domain names points to same hosted
    website. When someone browses my website using the URL
    http://www.web-2.com then I want a welcome message as "Welcome to
    web-2.com", when someone browses my website using the URL
    http://www.web-3.com then I want a welcome message as "Welcome to
    web-3.com".

    How can I achive this because I will have to dynamically change the
    welcome message? I am not interested in maintaining multiple pages.
    Any solution?


    ASK.
  • Michael Winter

    #2
    Re: How to get the URL?

    On 15 Feb 2004 08:46:33 -0800, ASK <askrishnan@yah oo.com> wrote:

    [snip]
    [color=blue]
    > How can I achive this because I will have to dynamically change the
    > welcome message? I am not interested in maintaining multiple pages.
    > Any solution?[/color]

    It would be best to do this server-side. However, window.location .href (or
    just window.location ) will retreive what you want.

    Mike

    --
    Michael Winter
    M.Winter@blueyo nder.co.invalid (replace ".invalid" with ".uk" to reply)

    Comment

    Working...