Jump to content

_IEFormElementSetValue problem in a web form


Recommended Posts

Hi to everyone! i'm glad to be register here! this is my first post...i'm starting to programming with autoit only yesterday!

I have a problem with: _IEFormElementSetValue, because also if i can see in a form that i compiled with _IEFormElementSetValue, when i submit the form, the site doesn't read the value written!

I have resolved with send() but i don't want to use it...:(

 

for example i try like this;

Local $oQuery = _IEFormElementGetObjByName($oForm, "phone")
_IEFormElementSetValue($oQuery, $telefono)
Sleep(1000)

o also with focus:

Local $oQuery = _IEFormElementGetObjByName($oForm, "email")
sleep(500)
_IEAction($oQuery, 'focus')
Sleep(500)
_IEFormElementSetValue($oQuery, $account[$riga_acc][1])

...the only method that works right now is:

Local $oQuery = _IEFormElementGetObjByName($oForm, "name")
_IEAction($oQuery, 'focus')
send($nome &"{TAB}")

....but i want to find a system to use _IEFormElementSetValue o something better the SEND!!!

 

thnks a lot you all for the help!

p.p.s. in every quote i used different objects 

p.s. the site form is: https://www2.subito.it/aif#insert

 

.

Edited by danyhack
Link to comment
Share on other sites

i resolved with this:

Local $oQuery = _IEFormElementGetObjByName($oForm, "email")
sleep(500)
_IEAction($oQuery, 'focus')
_IEPropertySet ( $oQuery, "innertext", $account[$riga_acc][1])

do you think that is the best solution, or there is another one for use _IEFormElementSetValue (without problem)?

tnks for attention!

Link to comment
Share on other sites

There is a lot of code attached to the field.  I did not try looking into it to see what it all does, but presumably it is maintaining another value outside the field and is not updating it on the default OnChange and OnClick events in common use.  You could try firing the OnKeyUp event to simulate some typing, but if your existing code works I would not bother changing it.  Otherwise you would need to dig through the site's code to determine what it is actually doing.  E.g. after the validity checking it performs, any valid value is probably placed into a hidden field so update both the visible and hidden fields.

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