473,396 Members | 1,923 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

help javascript program


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.typ e);
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="login:command/username" value="admin" >
<input type="hidden" name="login:command/password" value="password"

<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>
----------------------------------------------------------

Jul 23 '05 #1
3 1721
how can it possibel its have 198.168.1.1 its a protocol for intranet
how it be send it clearly

Jul 23 '05 #2
ku*************@hotmail.com wrote on 09 jul 2005 in comp.lang.javascript:
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.

--
Evertjan.
The Netherlands.
(Replace all crosses with dots in my emailaddress)

Jul 23 '05 #3


ku*************@hotmail.com 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

Jul 23 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: martingerber | last post by:
Hi, I have the following script (javascript in html document): <html> <head> <meta http-equiv="content-type" content="text/html;charset=ISO-8859-1"> <title>Standort Speichern</title>
0
by: Erland | last post by:
Hello All, I am using AJAX library( AjaxEngine from http://www.mathertel.de/AJAXEngine/) and having problems and hope someone here can help me. I have some piece of javascript code that I...
32
by: Tom Cole | last post by:
I bet 50% of the posts I've read lately have had at least one bad thing to say about every website or book dedicated to javascript. There are clearly a few posters (you know who you are) who...
36
by: aljamala | last post by:
Hi, I keep getting this warning on a page, but I do not know what the problem is...does anyone have an idea about what could be wrong? line 88 column 7 - Warning: missing </formbefore <td> it...
33
by: STILL LEARNING | last post by:
I'm not sure if this can even be done, but what prompts the question is my desire to be able to create an "Uber Link" script/code of some sort, such that even if the html page contains nothing but...
5
by: althafexcel | last post by:
hi everyone Im trying to include an external js in my aspx page under the head tag, it doesn't load or it displays an object expected error whenver the function from the .js is called. Actually...
0
by: wxscooter | last post by:
OK, this is frustrating. I want my VB6 program to use Webbrowser to fill out info on a page. One of the things I need to do is click an arrow to transfer an item from one text box to another. I...
1
by: lilbit02 | last post by:
Hi, I have a form that utilizes validation as most do via javascript. This form worked totaly fine until I needed to add a dynamic div now the validation doesn't work. It does work for the first...
3
by: Rajneesh Chellapilla | last post by:
Hi I made this marquee program however, I am having trouble getting all four marquees to line up correctly. Basically I want the the 4 marquees to line up on the four sides exactly so they intersect....
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.