Jump to content

How to select this input field in IE ?!


Vanaxel
 Share

Recommended Posts

hi there,

i've a asp page in IE where the source code of the concerning table looks like this:

<table bgcolor=#ffccff style="width: 500px;">

<tr>

<td class=stdfont colspan=2>

<b>Competition Finish Notification</b>

<input type=checkbox name=cfn value=1 onclick="checkcfn()">

(personal mail to member - maillabeltexts with tags allowed!!)

</td>

</tr>

</table>

this is what it looks like:

>> klick me<<

what i wanna do:

write a au3 script, which automaticly checks this damn checkbox. I've tried it with TAB, arrow-buttons and so on but i not able to navigate to this checkbox via keyboard - really anoying. As u can see on the picture, my cursor in IE is on the "Notification"-Tab.

anybody any ideas?

regards

Link to comment
Share on other sites

Try something like this:

#include <IE.au3>
$oIE = _IE_Example ("form")
$oForm = _IEFormGetObjByName ($oIE, "ExampleForm")
_IEFormElementCheckboxSelect ($oForm, "gameBasketball", "", 1, "byValue")

It checkes the box... perhaps you can use this in your script...

Neo

[center][font="Arial"]--- The Neo and Only --- [/font][font="Arial"]--Projects---[/font]Image to Text converterText to ASCII converter[/center]

Link to comment
Share on other sites

ok this worked ;)

now another question:

this is the source of the table concerning following picture:

<tr>
<td class=stdfont>Mastersgame:</td>
<td>
<input size=30 class=input type=text value="" name="mastersgamename" style="width: 200px;">
<input type=hidden name="mastersgameid" value="x">
<a onclick="select_mastersgame();">
<img style="CURSOR: hand;" align=absmiddle src="images/loadfile.gif"><a>
</td>               
</tr>

>>Picture<<

as u can see if you click on this grafic-button a javascript is called ("select_mastersgame();"). Is there a possibility to click this button automatically because you can't choose it via keyboard?

regards, Van

Link to comment
Share on other sites

See _IEImgClick

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

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