host and folder information from browser

admin

Administrator
Staff member
Hi

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

<!-- m --><a class="postlink" href="http://test8.sea.com:7777/wm_3084/login.html">http://test8.sea.com:7777/wm_3084/login.html</a><!-- m -->.

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.
 
Back
Top