dynamic new form elements itself, not only change values???

Discussion in 'Javascript' started by fred schulz, Jan 30, 2004.

  1. fred schulz

    fred schulz Guest

    I want use a script to login into a portal page.
    This page includes a javascript to dynamic generate new form elements.
    I replaced - in a local copy of the page -
    action="notmyserver.com/login" with "myserver.com/phpinfo.php".

    I saw 2 new form elements/php post vars
    VALIDATION_TRIGGER_1_X=9 and VALIDATION_TRIGGER_1_Y=80.

    But it is not enough to send all php post vars to successful login.

    How works witch magic javascript?

    How can i see the html post headers when i use netscape / IE to login
    manually?

    How can i log https connections?




    <SCRIPT LANGUAGE="JavaScript1.2">
    var netscape;
    var clicked = false;
    var display_text = "check input"
    var place;
    var meter;
    var out = " ";
    var place = 0;
    var inc = 1;
    if(navigator.appName.indexOf("etscape") != -1) netscape = true;
    if (netscape) {
    window.captureEvents(Event.KEYPRESS);
    window.onkeypress = doSubmit;
    document.captureEvents(Event.FOCUS);
    document.onfocus=rememberAppName;
    }
    function doSubmit(myEvent) {
    if (!netscape) return;
    if (myEvent.which == 13)
    document.LoginForm.VALIDATION_TRIGGER.click();
    window.captureEvents(Event.KEYPRESS);
    window.onkeypress = doSubmit;
    }
    function rememberAppName() {
    document.LoginForm.appName.value=navigator.appName;
    document.LoginForm.appVersion.value=navigator.appVersion;
    document.LoginForm.platform.value=navigator.platform;
    }
    function anim() {
    for (meter = 0; meter < place; meter++) {
    out += " "
    }
    if (place >= 0)
    out += display_text
    else
    out = display_text.substring(-place,display_text.length)
    window.status = out
    out = " "
    place+=inc;
    if (place > 30 || place < 0) {
    inc = -inc;
    }
    window.setTimeout("anim()", 100);
    }
    function checkIt() {
    if (clicked) {
    return false;
    }
    clicked = true;
    window.setTimeout("anim()", 1);
    return true;
    }
    </SCRIPT>
    <form method="post" target="_top" name="LoginForm" onSubmit="return
    checkIt()" action="loginscript">
    <input type=text size="6" class="input1" maxlength="3" value="303"
    name="username">
    <input onClick="rememberAppName()" type=image
    name="VALIDATION_TRIGGER_1" src="/Login.gif">
    <input onClick="rememberAppName()" type=image
    name="VALIDATION_TRIGGER_6" src="/overview.gif">
    <input onClick="rememberAppName()" type=image
    name="VALIDATION_TRIGGER_4" src="/overview2.gif">
    <input onClick="rememberAppName()" type=image
    name="VALIDATION_TRIGGER_3" src="/overview3.gif">
    <input type=hidden name="appName">
    <input type=hidden name="appVersion">
    <input type=hidden name="platform">
    <SCRIPT LANGUAGE=Javascript>
    if (document.LoginForm) {
    document.LoginForm.elements[0].focus();
    document.LoginForm.appName.value=navigator.appName;
    document.LoginForm.appVersion.value=navigator.appVersion;
    document.LoginForm.platform.value=navigator.platform;
    }
    </SCRIPT>
    </form>
     
    fred schulz, Jan 30, 2004
    #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. TNG
    Replies:
    2
    Views:
    2,349
  2. zhuang
    Replies:
    2
    Views:
    586
    zhuang
    May 8, 2006
  3. Behzad
    Replies:
    6
    Views:
    715
    Juan T. Llibre
    Apr 27, 2007
  4. J P Singh
    Replies:
    1
    Views:
    137
    Ray at
    Nov 19, 2003
  5. Replies:
    1
    Views:
    120
Loading...

Share This Page