help javascript program

F

f700b

I have the bellow javascript code.
I know the username and the password , and I like
to modify this code for login without press intro.
It is possible?.
Thanks

--------------------------------
<html>
<head>
<link rel="stylesheet" href="../html/css/alpha.css" type="text/css">
<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;
if (ns)
{
document.onmousedown=whichF;
if (ver==4 || ver==5)
{
document.captureEvents(Event.KEYDOWN | Event.MOUSEDOWN);
}
}


function whichF(e)
{
focusButton=(ns?e.target.type:event.srcElement.type);
if (ns)
{
focusTarget=e.which;
}
else
{
chkKey(e);
}
}

function chkKey(e)
{
var chk=(ns?focusTarget:event.keyCode);
if (chk==13)
{
DoLogin();
}
DoLogin();
}

</script>
</head>
<body>
<script type='text/javascript'>
<!-- main table -->
mainTableStart() ;
<!-- header and logo area [ First row ] -->
headerandlogo(1) ;
<!-- Second Row -->
secondRowStart() ;
<!-- Left Area -->
leftArea(0,0,0,0,1) ;
<!-- content main table start -->
contentMainTableStart() ;
contentTableStart(0,1) ;
</script>

<!-- #bbinclude "index-main.html" -->

<!-- end bbinclude -->


<form method="POST"
action='http://192.168.1.1/cgi-bin/webcm?getpage=../html/status/syslog.htm'
name="formLogin">
<input type="hidden" name="getpage" value="../html/home.htm">
<input type="hidden" name="errorpage" value="../html/index.html" >
<input type="hidden" name="var:errormsg" value="Error">
</form>

<table width="540px" height="410" border="0" align="center"
bordercolor="#000000" cellspacing="0" cellpadding="8">
<tr>
<td height="35" class="tabhead"><div align="left">Login</div></td>
</tr>
<tr>
<td height="244" align="center" valign = "top">




<form name="usrInput">
<table width="100%" border="0" align="center" bordercolor="#000000"
cellspacing="0" cellpadding="5">
<tr>
<td colspan="3" class="blubg">Please log in to continue
</td>
</tr>
<tr>
<td width="5%" class="tabdata">&nbsp;
</td>
<td width="26%" class="tabdata">Login Name </td>
<td width="69%" class="tabdata"><input type="text" name="username"
maxlength="64" value="admin">
</td>
</tr>
<tr>
<td class="tabdata">&nbsp;
</td>
<td class="tabdata">Password </td>
<td width="69%" class="tabdata"><input type=password name=password
maxlength="64" value="password"></td>
</tr>
<tr>
<td colspan="2" class="tabdata">&nbsp;
</td>

<td width="69%" class="tabdata">

</td>

</tr>
<tr>
<td colspan="3" class="tabdata"><center><font color="red"
align=center>


</font></center>
</td>
</tr>
</table>
</form>
</td>
</tr>
----------------------------------------------------------
 
K

kumarbaba_shaik

how can it possibel its have 198.168.1.1 its a protocol for intranet
how it be send it clearly
 
E

Evertjan.

how can it possibel its have 198.168.1.1 its a protocol for intranet
how it be send it clearly

Responding on a posting should always include a quote on usenet.

The original could be away on some servers,
and why should we bother searching?

Please keep to netiquette on usenet.
 
F

f700b

(e-mail address removed) ha escrito:
how can it possibel its have 198.168.1.1 its a protocol for intranet
how it be send it clearly

yes, the 'action' open a intranet html page.
This page has paassword protection.
I like to modify this code for eliminate the manual process
of submitting the data.Thanks in advance
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,265
Latest member
TodLarocca

Latest Threads

Top