2 posts in this topic
I'm new to the forums! Couldn't find any threads covering this issue. Sorry if I'm wrong.
I'm having problems changing the text/value of a input box. The particular box doesn't have a name or id, just: class="jq_hotkeys_enabled form-control".
This class appears multiple times throughout the source, so I don't think It's right to reference that object.
See image 1.
However, I've managed to find a object with the name "ctl00$content$ctrl$ucServiceTime$rpServicetimes$ctl00$edtHiddenResourceHelper" which contains the value of the input box, and the id for the person in the dropdown/combobox left of it. (with "dummy-1" selected).
See image 2.
As you can see the value is 3982,4545 ( name , time )
But when I try to change the value of it by doing:
#include <IE.au3> Local $oIE = _IEAttach(WinGetHandle("[CLASS:IEFrame]"),"embedded") Local $oForm = _IEFormGetObjByName($oIE, "aspnetForm") Local $oInput = _IEFormElementGetObjByName($oForm, "ctl00$content$ctrl$ucServiceTime$rpServicetimes$ctl00$edtHiddenResourceHelper") _IEFormElementSetValue($oInput, "3982,1337") The box doesn't get its new value. I can see in the source that it's changed though.
See image 3.
However, if I do:
#include <IE.au3> Local $oIE = _IEAttach(WinGetHandle("[CLASS:IEFrame]"),"embedded") Local $oForm = _IEFormGetObjByName($oIE, "aspnetForm") Local $oInput = _IEFormElementGetObjByName($oForm, "ctl00$content$ctrl$ucServiceTime$rpServicetimes$ctl00$edtHiddenResourceHelper") _IEFormElementSetValue($oInput, "3982,1337") $oIE.document.parentwindow.execScript("theForm.submit()") ; But it needs to reload the page The box gets its new value after the page reloads by the theForm.submit() function.
This is a bit unfortunate as I want the changes to happen instantly like when I type in the box with the keyboard... or select in the combobox.
Maybe someone knows how I can do this? Looking forward to an answer!
Thanks in advance.
Note: Unfortunately I can't provide with the real URL as it is constricted to employees in the company I work for, but let me know If I should provide anything else.
How can I check if element is focused in Firefox using FF.au3 UDF?
This is my try:
I have prepared a function that checks if the object is focused:
After a lot of try/fails I inserted an alert box in order to display the object being compared.
Here is what I got
The focused object is: [object XULElement]
The object that I send for comparing is [object HTMLInputElement]
Why is that?
I'm playing a bit with the ScriptControl object using as base this example by @genius257.
here is a very simple try, ... but it fails. what I'm doing wrong?
Hi, what else can we add in <table> besides <tr> & <td> to make it more interative to the users?
I've made this HTTP lib to simplify HTTP requests, mainly when dealing about POST data or file uploads.
Three functions are available:
string _HTTP_Get ( string $sURL ) string _HTTP_Post ( string $sURL , string $sPostData ) string _HTTP_Upload ( string $sURL , string $sFilePath , string $sFileField , string $sPostData = '' , string $sFilename = Default) Additionaly, two helper functions are also available:
URLEncode($sStr) URLDecode($sStr) Full documentation: https://github.com/jesobreira/HTTP.au3/blob/master/README.md
Fork me on Github: https://github.com/jesobreira/HTTP.au3
Download lib + docs: https://github.com/jesobreira/HTTP.au3/archive/master.zip