Sign in to follow this  
Followers 0
ausssieautomate

IE Query Interface with Document Elements in Forms

6 posts in this topic

Hi Guys,

Just playing around with AutoIT and DebugBar awesome tools :) . I am trying to interface with Html Document Elements (Dynamic HTML).

For instance:

Javascript code

document.getElementById("var1").style.display = 'none';

This is connected to textbox I made up, the Form name is "Testpage". Is their any way I can insert text in the textbox?

Any help would be much appreciated.

Thanks


Frequent sufferer of ID10T Syndrome and CRAFT (Can't Remember A "BLEEP" Thing)

Share this post


Link to post
Share on other sites



Hi Brett,

Yup I tried that my code

$oIE = _IEAttach("page1.html")

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

$input1 = _IEFormElementGetObjByName ($oForm, "var1")

_IEFormElementSetValue ($input1, "sfad")

Nothing Happens.

_IEFormElementSetValue

Cheers,

Brett


Frequent sufferer of ID10T Syndrome and CRAFT (Can't Remember A "BLEEP" Thing)

Share this post


Link to post
Share on other sites

Do you get any errors? Could you post some of the html code?

Share this post


Link to post
Share on other sites

There are five examples in the helpfile for _IEFormElementSetValue - please run them so that you know what to expect. If it isn't doing what you expect in your case, figure out what is different about your situation from what works in the examples. Make sure you run using F5 in SciTe so that you see the diagnostic messages that IE.au3 generates.

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

Share this post


Link to post
Share on other sites

Hi Guys,

Sorry my net connection wen't down, worked out the problem after a couple of hrs though damn javascript issue :) . Cheers for your assistance anyways.

There are five examples in the helpfile for _IEFormElementSetValue - please run them so that you know what to expect. If it isn't doing what you expect in your case, figure out what is different about your situation from what works in the examples. Make sure you run using F5 in SciTe so that you see the diagnostic messages that IE.au3 generates.

Dale


Frequent sufferer of ID10T Syndrome and CRAFT (Can't Remember A "BLEEP" Thing)

Share this post


Link to post
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
Sign in to follow this  
Followers 0