Jump to content

Form id


Recommended Posts

ok im trying to use this string :

$oForm = _IEFormGetObjByName ($oIE, "falala")

normall this would work, as it did for this form

<form method="POST" action="balba" id="login_form" onsubmit="return Event.__inlineSubmit(this,event)">

however the second hasnt got a id, is it possible to use the class instead ?

<form class="checkpoint" action="/checkpoint/" method="post" onsubmit="return Event.__inlineSubmit(this,event)">

if you require a little more infomation or the means feel free to ask

thanks in advance

//edited, would a <div id= suffice instead of the form id ?

Edited by Thornhunt

Budweiser + room = warm beerwarm beer + fridge = too long!warm beer + CO2 fire extinguisher = Perfect![quote]Protect the easly offended ... BAN EVERYTHING[/quote]^^ hmm works for me :D

Link to comment
Share on other sites

Read the remarks for _IEFormGetObjByName in the helpfile.

Dale

Edited by DaleHohm

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

In case you follow through with Thornhunt's advice and still wonder how to proceed: you may want to iterate the collection and test each member for something that you know is unique about that form. If you know that the form is in a div with an id and that div contains only the single form then you could do something like

document.getElementById("div_id").getElementsByTagName("form")[0]

which would require just a few steps in an AutoIt script: capture document.getElementById("div_id") in a variable then use that object's getElementsByTagName to capture that collection in a variable then set your form's variable to the first member of that collection. There may be a way to do this utilizing IE.au3, I've just not used it myself if there is on account of most of my work with DOM being outside of AutoIt

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