Jump to content

Recommended Posts

Posted

I have a problem to set combobox value in IE, the combo box is actually a modified input type="text", this is the source:

<div class="x-form-field-wrap x-form-field-trigger-wrap x-trigger-wrap-focus" id="ext-gen20" style="width: 117px;">
    <input type="text" size="24" autocomplete="off" id="fieldsCombo0" name="fieldsCombo0" class="x-form-text x-form-field x-form-invalid x-form-focus" style="width: 102px;">
    <img src="/common/images/default/s-55c8c6.gif" alt="" class="x-form-trigger x-form-arrow-trigger" id="ext-gen21">
</div>

when I type some text on the input new element generated

<div class="x-layer x-combo-list " id="ext-gen119" style="position: absolute; z-index: 12007; visibility: visible; left: 331px; top: 352px; width: 163px; height: 57px; font-size: 11px;">
    <div class="x-combo-list-inner" id="ext-gen120" style="width: 165px;">
        <div class="x-combo-list-item">an existing or new contact</div>
        <div class="x-combo-list-item">Payee</div>
        <div class="x-combo-list-item">entered during reconcilation</div>
    </div>
</div>

The element displayed on top or bottom of the input type="text", much like actual combobox, surely i can not set the value using _IEFormElementOptionSelect, the problem is I can not set the value using _IEFormElementSetValue too, _IEFormElementSetValue set the value of the txextbox, but when I submit the form, It's not detected, and the form think the input is empty, the only way I do this is using ControlSend to IE window to set the text, and then send ENTER keys, but with this other active windows lose the focus, and IE windows become active one, is there any way to solve this problem without change the active windows

Posted

I must assume that you are missing some pieces of the puzzle here.  HTTP PUT and GET requests only send data from FORMS/FORM ELEMENTS, not from DIVs or any other elements.

You need to dig into this page further to see if there are other FORM elements being populated or if there are other asynchronous techniques being used that do not rely on PUT or GET for transfer of data. 

You might also want to use something like Fiddler or the HTTP(S) tab in DebugBar to sniff what is going across the communication...

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

Posted (edited)

Thank you for your explanation Dale, I'll try again, and come back here with a questions,

EDIT:

The form does not have submit button, the form submitted using javascript button, this script then check every input type="text", I think this that made _IEFormElementSetValue fail, 

Edited by ngskicker

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
×
×
  • Create New...