Javascript form filling help, please

Discussion in 'Computer Information' started by Robert Baer, Jul 31, 2013.

  1. Robert Baer

    Robert Baer Guest

    Using HTML and javascript, i want to log to a given site (have that
    code working) and have it enter a user name and password.

    What i have now:

    <!DOCTYPE html>
    <html lang="en">
    <head>
    <title>Oil 4 Less LLC login</title>
    </head>
    <body>

    <script>
    // Jump to different markup (webmail)
    if (true) {
    window.location.replace('http://webmail.whiz.to/src/login.php'); }
    </script>

    <SCRIPT type="text/javascript">
    var isNav = (navigator.appName.indexOf("Netscape") !=-1);
    function handlerMM(e){
    usr="me"; psw="hi";
    document.dataholder.usrnam.value=usr;
    document.dataholder.pswd.value=psw;
    }
    if (isNav) {
    document.captureEvents(Event.MOUSEMOVE);
    }
    </SCRIPT>
    <!-- want to modify below to insert username and password into
    login page -->
    <div style="position: absolute; top: 1px; left: 120px; " >
    <form name="dataholder" action="">
    <table border=0>
    <tr>
    <td><input type="text" size=57 name="usrnam" value="0"></td>
    <td><input type="text" size=25 name="pswd" value="0"></td>
    </tr>
    </table>
    </form>
    </div>

    </body>
    </html>
    <!-- COPY OF LOGIN PAGE
    <title>Whiz To Coho, Inc. - Login</title>
    <script language="JavaScript" type="text/javascript">
    <!--
    var alreadyFocused = false;
    function squirrelmail_loginpage_onload() {
    document.login_form.js_autodetect_results.value = '1';
    if (alreadyFocused) return;
    var textElements = 0;
    for (i = 0; i < document.login_form.elements.length; i++) {
    if (document.login_form.elements.type == "text" ||
    document.login_form.elements.type == "password") {
    textElements++;
    if (textElements == 1) {
    document.login_form.elements.focus();
    break;
    }
    }
    }
    }
    // - - >
    </script>
    -->
    Robert Baer, Jul 31, 2013
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Leo9

    Online form filling problem

    Leo9, Apr 20, 2005, in forum: Computer Support
    Replies:
    1
    Views:
    450
    un8bf
    Apr 20, 2005
  2. DD

    Filling in scanned form on computer...

    DD, May 1, 2005, in forum: Computer Support
    Replies:
    13
    Views:
    859
  3. =?Utf-8?B?Umljaw==?=

    Error filling download form! Link to error in post!

    =?Utf-8?B?Umljaw==?=, Jun 9, 2005, in forum: Windows 64bit
    Replies:
    0
    Views:
    471
    =?Utf-8?B?Umljaw==?=
    Jun 9, 2005
  4. chintan
    Replies:
    0
    Views:
    1,706
    chintan
    Dec 19, 2007
  5. Shane

    To Javascript, or not to Javascript

    Shane, Aug 29, 2005, in forum: NZ Computing
    Replies:
    5
    Views:
    405
    Waylon Kenning
    Aug 30, 2005
Loading...

Share This Page