Jump to content

Form submission in IE


Recommended Posts

How do i get the form name from any website?

Its a login page and i wish to use this "_IEFormGetObjByName" and related functions from ie.au3

The function takes in form name as parameter, how do i know that and the names for fields in the form

Link to comment
Share on other sites

How do i get the form name from any website?

Its a login page and i wish to use this "_IEFormGetObjByName" and related functions from ie.au3

The function takes in form name as parameter, how do i know that and the names for fields in the form

Use AutoIt Window Info

Link to comment
Share on other sites

Drag the crosshair over the titlebar of IE...

buddy, i ve used window info tool to get window names n button names and instances; here te problem is to get the name of the form and fields in the form on IE page.

check the following ex in autoit help page which uses hotmail login n gives form name:

$oIE = _IECreate ("http://www.hotmail.com")

; get pointers to the login form and username, password and signin fields

$o_form = _IEFormGetObjByName ($oIE, "f1")

$o_login = _IEFormElementGetObjByName ($o_form, "login")

$o_password = _IEFormElementGetObjByName ($o_form, "passwd")

$o_signin = _IEFormElementGetObjByName ($o_form, "SI")

how have they given the name of form as "f1", thats my concern

please help

Link to comment
Share on other sites

buddy, i ve used window info tool to get window names n button names and instances; here te problem is to get the name of the form and fields in the form on IE page.

check the following ex in autoit help page which uses hotmail login n gives form name:

$oIE = _IECreate ("http://www.hotmail.com")

; get pointers to the login form and username, password and signin fields

$o_form = _IEFormGetObjByName ($oIE, "f1")

$o_login = _IEFormElementGetObjByName ($o_form, "login")

$o_password = _IEFormElementGetObjByName ($o_form, "passwd")

$o_signin = _IEFormElementGetObjByName ($o_form, "SI")

how have they given the name of form as "f1", thats my concern

please help

Ok, now I've understood your problem.

The names of the form and form elements can be found by viewing the page HTML source. Right click->View Source Code. :)

Edited by Kiti
Link to comment
Share on other sites

There are many ways... be careful with View Source as it shows you the page source before client-side processing (dynamic HTML)... my suggestion is DebugBar (see my sig).

Dale

Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y

Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Link to comment
Share on other sites

There are many ways... be careful with View Source as it shows you the page source before client-side processing (dynamic HTML)... my suggestion is DebugBar (see my sig).

Dale

Yeah!! thanks for the tool info

Link to comment
Share on other sites

Yup, solved.. Thank You

Hmmm, now i need to automate the right click and select action itself :)..

I know to use click button , but then how do i click any option on right click contest menu, sat right click->property

Link to comment
Share on other sites

  • 4 months later...

Hello folks,

I have a similar problem to solve. This is (part of) the code:

<tr>
    <td align="right">
        <label for="logfield">your e-mail
        </label>
    </td>
    <td>
        <input type="text" name="login" id="logfield" class="field" style="width:195px" value=""/><br />
    </td>
</tr>

<tr>
    <td align="right">
        <label for="passfield">password
        </label>
    </td>
    <td>
        <input type="password" name="password" id="passfield" class="field" style="width:195px" value=""/><br />
    </td>
</tr>

<tr>
    <td></td>
    <td class="small" nowrap="nowrap">
        <input type="checkbox" name="remember" id="remfield"  value="true" class="absmid"/>
        <label for="remfield">Remember me
        </label>
    </td>
</tr>

<tr>
    <td></td>
    <td style="padding:10px 0">
        <a href="java script:login();" class="btn3">
            <span>
                <span>
                    <span>Login
                    </span>
                </span>
            </span>
        </a>
    </td>
</tr>

I have to make a small piece of code to type in an eMail address and a password into "login" and "password" fields respectively, and then press "Login" button. No need to set/reset "remember" checkbox. That's all! What kind of code would best fit my needs? TIA.

Best,
Euler

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...