dcsimg
www.webdeveloper.com
Results 1 to 2 of 2

Thread: host and folder information from browser

  1. #1
    Join Date
    Jan 2003
    Posts
    6

    host and folder information from browser

    Hi

    Is there anyway i can get this too.
    i fire my login.html from

    http://test8.sea.com:7777/wm_3084/login.html.

    window.location.host returns test8.sea.com:7777 i have hardcoded /wm_3084 inside scriptfunction.i don't want it to be hardcoded.

    is there anyway i can get test8.sea.com:7777/wm_3084

    i have my html script like this

    function user(formName)
    {
    document.login.userid.value = formName.username.value + "/" +
    formName.password.value + "@" + formName.database.value;
    formName.action= "http://" + window.location.host + "/wm_3084/rwservlet?"
    return true;
    }
    </SCRIPT>
    </HEAD>
    <BODY>
    <FORM name="login" method="post" action="" onSubmit="user(this)">

    Thanks in advance.
    Divya.

  2. #2
    Join Date
    Dec 2002
    Location
    Calgary, Canada
    Posts
    2,653
    Instead of
    window.location.host

    use
    window.location.href

    Cheers

    Khalid

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles