Dear all,
I have an ip device that requires login. It has a form which uses javascript.
I want to login to this device from a script from somewhere on the web. Is it possible to pass in the username and password as params?
I’ve extracted the following from the login form of the ip device…
<head>
<script type=’text/javascript’ src=”../html/js/alphaindex.js”></script>
<script Language=”JavaScript”>
function DoLogin()
{
document.formLogin.elements[2].value=document.usrInput.username.value;
document.formLogin.elements[3].value=document.usrInput.password.value;
document.formLogin.submit();
}
var focusTarget=-999;
var focusButton;
var ns=(navigator.appName==”Netscape”?1:0);
var ver=parseInt(navigator.appVersion)
document.onkeydown=whichF;
function chkKey(e)
{
var chk=(ns?focusTarget:event.keyCode);
if (chk==13)
{
DoLogin();
}
return true;
}
</script>
</head>
<body>
<form method=”POST” action=”../cgi-bin/webcm” name=”formLogin”>
<input type=”hidden” name=”getpage” value=”../html/home.htm”>
<input type=”hidden” name=”errorpage” value=”../html/index.html” >
<input type=”hidden” name=”login:command/username” value=”admin” >
<input type=”hidden” name=”login:command/password” value=”” >
<input type=”hidden” name=”var:errormsg” value=”Error”>
</form>