Jump to content

Cannot paste test into IE form


yeeva
 Share

Recommended Posts

hi all,

im having a hard time pasting a name into an IE form. i manage to paste text 'Maximo' into 1 of the textbox in IE form but not 'john' into another textbox on the same form. The textbox for 'john' has multiple IDs/name. if i were to use the bottom 3 codes on $oQuery marked as comment, i manage to paste 'john' on the textbox but i want to paste the text while the IE isnt the active window (i cant use send(), when IE is not the active window). please help, thanks...

$oQuery = _IEGetObjById($oForm, "ctl00_m_g_e4d6bb9e_0a3e_4b18_bfff_0bdb6a0f4c03_ctl00_ctl04_ctl04_ctl00_ctl00_ctl04_ctl00_ctl00_UserField_upLevelDiv")
_IEFormElementSetValue ($oQuery, "john") <<<<<< THIS IS NOT WORKING

;_IEAction($oQuery, "focus")
;_IEAction($oQuery, "selectall"
;Send("john")
$oQuery2nd = _IEGetObjById($oForm, "ctl00$m$g_e4d6bb9e_0a3e_4b18_bfff_0bdb6a0f4c03$ctl00$ctl04$ctl07$ctl00$ctl00$ctl04$ctl00$ctl01")
_IEFormElementSetValue ($oQuery2nd, "Maximo") <<<<< THIS WORKS FINE

the source for $oQuery is :

<!-- FieldName="RFC Implementer"
FieldInternalName="RFC_x0020_Implementer"
FieldType="SPFieldUser"
-->
<span dir="none">
<input name="ctl00$m$g_e4d6bb9e_0a3e_4b18_bfff_0bdb6a0f4c03$ctl00$ctl04$ctl04$ctl00$ctl00$ctl04$ctl00$ctl00$HiddenUserFieldValue" type="hidden" id="ctl00_m_g_e4d6bb9e_0a3e_4b18_bfff_0bdb6a0f4c03_ctl00_ctl04_ctl04_ctl00_ctl00_ctl04_ctl00_ctl00_HiddenUserFieldValue" />
<span id="ctl00_m_g_e4d6bb9e_0a3e_4b18_bfff_0bdb6a0f4c03_ctl00_ctl04_ctl04_ctl00_ctl00_ctl04_ctl00_ctl00_UserField" class="ms-usereditor" NoMatchesText="&lt;No Matching Names>" MoreItemsText="More Names..." RemoveText="Remove" value="" allowEmpty="1" ShowEntityDisplayTextInTextBox="0" EEAfterCallbackClientScript=""><input name="ctl00$m$g_e4d6bb9e_0a3e_4b18_bfff_0bdb6a0f4c03$ctl00$ctl04$ctl04$ctl00$ctl00$ctl04$ctl00$ctl00$UserField$hiddenSpanData" type="hidden" id="ctl00_m_g_e4d6bb9e_0a3e_4b18_bfff_0bdb6a0f4c03_ctl00_ctl04_ctl04_ctl00_ctl00_ctl04_ctl00_ctl00_UserField_hiddenSpanData" /><input name="ctl00$m$g_e4d6bb9e_0a3e_4b18_bfff_0bdb6a0f4c03$ctl00$ctl04$ctl04$ctl00$ctl00$ctl04$ctl00$ctl00$UserField$OriginalEntities" type="hidden" id="ctl00_m_g_e4d6bb9e_0a3e_4b18_bfff_0bdb6a0f4c03_ctl00_ctl04_ctl04_ctl00_ctl00_ctl04_ctl00_ctl00_UserField_OriginalEntities" value="&lt;Entities />" /><input name="ctl00$m$g_e4d6bb9e_0a3e_4b18_bfff_0bdb6a0f4c03$ctl00$ctl04$ctl04$ctl00$ctl00$ctl04$ctl00$ctl00$UserField$HiddenEntityKey" type="hidden" id="ctl00_m_g_e4d6bb9e_0a3e_4b18_bfff_0bdb6a0f4c03_ctl00_ctl04_ctl04_ctl00_ctl00_ctl04_ctl00_ctl00_UserField_HiddenEntityKey" /><input name="ctl00$m$g_e4d6bb9e_0a3e_4b18_bfff_0bdb6a0f4c03$ctl00$ctl04$ctl04$ctl00$ctl00$ctl04$ctl00$ctl00$UserField$HiddenEntityDisplayText" type="hidden" id="ctl00_m_g_e4d6bb9e_0a3e_4b18_bfff_0bdb6a0f4c03_ctl00_ctl04_ctl04_ctl00_ctl00_ctl04_ctl00_ctl00_UserField_HiddenEntityDisplayText" /><table id="ctl00_m_g_e4d6bb9e_0a3e_4b18_bfff_0bdb6a0f4c03_ctl00_ctl04_ctl04_ctl00_ctl00_ctl04_ctl00_ctl00_UserField_OuterTable" class="ms-usereditor" cellspacing="0" cellpadding="0" border="0" style="border-collapse:collapse;">
     <tr valign="bottom">
     <td valign="top" style="width:90%;"><table cellpadding="0" cellspacing="0" border="0" style="width:100%;table-layout:fixed;">
     <tr>
     <td><div id="ctl00_m_g_e4d6bb9e_0a3e_4b18_bfff_0bdb6a0f4c03_ctl00_ctl04_ctl04_ctl00_ctl00_ctl04_ctl00_ctl00_UserField_upLevelDiv" TabIndex="0" onfocusIn="this._fFocus=1;saveOldEntities('ctl00_m_g_e4d6bb9e_0a3e_4b18_bfff_0bdb6a0f4c03_ctl00_ctl04_ctl04_ctl00_ctl00_ctl04_ctl00_ctl00_UserField_upLevelDiv')" onclick="onclickRw(true, true);" onchange="updateControlValue('ctl00_m_g_e4d6bb9e_0a3e_4b18_bfff_0bdb6a0f4c03_ctl00_ctl04_ctl04_ctl00_ctl00_ctl04_ctl00_ctl00_UserField')" onfocusOut="this._fFocus=0;" onpaste="dopaste();" AutoPostBack="0" class="ms-inputuserfield" ondragStart="canEvt(event);" onkeyup="return onkeyupRw('ctl00_m_g_e4d6bb9e_0a3e_4b18_bfff_0bdb6a0f4c03_ctl00_ctl04_ctl04_ctl00_ctl00_ctl04_ctl00_ctl00_UserField');" oncopy="docopy();" onblur="updateControlValue('ctl00_m_g_e4d6bb9e_0a3e_4b18_bfff_0bdb6a0f4c03_ctl00_ctl04_ctl04_ctl00_ctl00_ctl04_ctl00_ctl00_UserField')" Title="People Picker" onkeydown="return onkeydownRw(this, 'ctl00_m_g_e4d6bb9e_0a3e_4b18_bfff_0bdb6a0f4c03_ctl00_ctl04_ctl04_ctl00_ctl00_ctl04_ctl00_ctl00_UserField', 3, true, event);" contentEditable="true" style="width: 100%; word-wrap: break-work;overflow-x: hidden; background-color: window; color: windowtext;" name="upLevelDiv"></div><textarea name="ctl00$m$g_e4d6bb9e_0a3e_4b18_bfff_0bdb6a0f4c03$ctl00$ctl04$ctl04$ctl00$ctl00$ctl04$ctl00$ctl00$UserField$downlevelTextBox" rows="1" cols="20" id="ctl00_m_g_e4d6bb9e_0a3e_4b18_bfff_0bdb6a0f4c03_ctl00_ctl04_ctl04_ctl00_ctl00_ctl04_ctl00_ctl00_UserField_downlevelTextBox" class="ms-input" onkeydown="return onkeydownRw(this, 'ctl00_m_g_e4d6bb9e_0a3e_4b18_bfff_0bdb6a0f4c03_ctl00_ctl04_ctl04_ctl00_ctl00_ctl04_ctl00_ctl00_UserField', 3, true, event);" onkeyup="onkeyupRw('ctl00_m_g_e4d6bb9e_0a3e_4b18_bfff_0bdb6a0f4c03_ctl00_ctl04_ctl04_ctl00_ctl00_ctl04_ctl00_ctl00_UserField');" Title="People Picker" AutoPostBack="0" style="width:100%;display: none;position: absolute; "></textarea></td>
     </tr>
     </table></td><td align="right" valign="top" nowrap="true" style="padding-left:5px;"><a id="ctl00_m_g_e4d6bb9e_0a3e_4b18_bfff_0bdb6a0f4c03_ctl00_ctl04_ctl04_ctl00_ctl00_ctl04_ctl00_ctl00_UserField_checkNames" title="Check Names" onclick="var arg=getUplevel('ctl00_m_g_e4d6bb9e_0a3e_4b18_bfff_0bdb6a0f4c03_ctl00_ctl04_ctl04_ctl00_ctl00_ctl04_ctl00_ctl00_UserField');var ctx='ctl00_m_g_e4d6bb9e_0a3e_4b18_bfff_0bdb6a0f4c03_ctl00_ctl04_ctl04_ctl00_ctl00_ctl04_ctl00_ctl00_UserField';EntityEditorSetWaitCursor(ctx);WebForm_DoCallback('ctl00$m$g_e4d6bb9e_0a3e_4b18_bfff_0bdb6a0f4c03$ctl00$ctl04$ctl04$ctl00$ctl00$ctl04$ctl00$ctl00$UserField',arg,EntityEditorHandleCheckNameResult,ctx,EntityEditorHandleCheckNameError,true);return false;" href="javascript:"><img title="Check Names" src="/_layouts/images/checknames.gif" alt="Check Names" style="border-width:0px;" /></a>&nbsp;<a id="ctl00_m_g_e4d6bb9e_0a3e_4b18_bfff_0bdb6a0f4c03_ctl00_ctl04_ctl04_ctl00_ctl00_ctl04_ctl00_ctl00_UserField_browse" accesskey="B" title="Browse" onclick="__Dialog__ctl00_m_g_e4d6bb9e_0a3e_4b18_bfff_0bdb6a0f4c03_ctl00_ctl04_ctl04_ctl00_ctl00_ctl04_ctl00_ctl00_UserField(); return false;" href="javascript:"><img title="Browse" src="/_layouts/images/addressbook.gif" alt="Browse" style="border-width:0px;" /></a></td>
     </tr><tr>
     <td colspan="3"><span id="ctl00_m_g_e4d6bb9e_0a3e_4b18_bfff_0bdb6a0f4c03_ctl00_ctl04_ctl04_ctl00_ctl00_ctl04_ctl00_ctl00_UserField_errorLabel" class="ms-error"></span></td>
     </tr><tr>
     <td colspan="3"><span style="font-size:8pt;">Name of the person who will implement the change</span></td>
     </tr>
</table></span>
</span>


</TD>
</TR>

<TR>
<TD nowrap="true" valign="top" width="190px" class="ms-formlabel"><H3 class="ms-standardheader">
<nobr>RFC Implementer team (optional)</nobr>
</H3></TD>
<TD valign="top" class="ms-formbody" width="400px">

the source for $oQuery2nd is :

<!-- FieldName="Workflow Tool"
FieldInternalName="Workflow_x0020_Tool"
FieldType="SPFieldChoice"
-->
<span dir="none"><table cellpadding="0" cellspacing="1">
     <tr>
     <td><span title="Workflow Tool: Choose Option"><input id="ctl00_m_g_e4d6bb9e_0a3e_4b18_bfff_0bdb6a0f4c03_ctl00_ctl04_ctl07_ctl00_ctl00_ctl04_ctl00_DropDownButton" type="radio" name="ctl00$m$g_e4d6bb9e_0a3e_4b18_bfff_0bdb6a0f4c03$ctl00$ctl04$ctl07$ctl00$ctl00$ctl04$ctl00$FillInButton" value="DropDownButton" checked="checked" /></span><label class="ms-hidden" for="ctl00_m_g_e4d6bb9e_0a3e_4b18_bfff_0bdb6a0f4c03_ctl00_ctl04_ctl07_ctl00_ctl00_ctl04_ctl00_DropDownButton">Workflow Tool: Choose Option</label><select onclick="SetChoiceOption('ctl00_m_g_e4d6bb9e_0a3e_4b18_bfff_0bdb6a0f4c03_ctl00_ctl04_ctl07_ctl00_ctl00_ctl04_ctl00_DropDownButton')" name="ctl00$m$g_e4d6bb9e_0a3e_4b18_bfff_0bdb6a0f4c03$ctl00$ctl04$ctl07$ctl00$ctl00$ctl04$ctl00$DropDownChoice" id="ctl00_m_g_e4d6bb9e_0a3e_4b18_bfff_0bdb6a0f4c03_ctl00_ctl04_ctl07_ctl00_ctl00_ctl04_ctl00_DropDownChoice" title="Workflow Tool: Choice Drop Down" class="ms-RadioText">
Link to comment
Share on other sites

sorry, the source for $oQuery 2nd is :

</select></td>
     </tr><tr>
      <td><span onclick="SetFocusOnControl('ctl00_m_g_e4d6bb9e_0a3e_4b18_bfff_0bdb6a0f4c03_ctl00_ctl04_ctl07_ctl00_ctl00_ctl04_ctl00_ctl01')" class="ms-RadioText" title="Workflow Tool: Specify your own value:"><input id="ctl00_m_g_e4d6bb9e_0a3e_4b18_bfff_0bdb6a0f4c03_ctl00_ctl04_ctl07_ctl00_ctl00_ctl04_ctl00_FillInButton" type="radio" name="ctl00$m$g_e4d6bb9e_0a3e_4b18_bfff_0bdb6a0f4c03$ctl00$ctl04$ctl07$ctl00$ctl00$ctl04$ctl00$FillInButton" value="FillInButton" /><label for="ctl00_m_g_e4d6bb9e_0a3e_4b18_bfff_0bdb6a0f4c03_ctl00_ctl04_ctl07_ctl00_ctl00_ctl04_ctl00_FillInButton">Specify your own value:</label></span></td>
     </tr><tr>
      <td>&nbsp;&nbsp;&nbsp;<input onclick="SetChoiceOption('ctl00_m_g_e4d6bb9e_0a3e_4b18_bfff_0bdb6a0f4c03_ctl00_ctl04_ctl07_ctl00_ctl00_ctl04_ctl00_FillInButton')" onfocus="SetChoiceOption('ctl00_m_g_e4d6bb9e_0a3e_4b18_bfff_0bdb6a0f4c03_ctl00_ctl04_ctl07_ctl00_ctl00_ctl04_ctl00_FillInButton')" name="ctl00$m$g_e4d6bb9e_0a3e_4b18_bfff_0bdb6a0f4c03$ctl00$ctl04$ctl07$ctl00$ctl00$ctl04$ctl00$ctl01" type="text" maxlength="255" id="ctl00_m_g_e4d6bb9e_0a3e_4b18_bfff_0bdb6a0f4c03_ctl00_ctl04_ctl07_ctl00_ctl00_ctl04_ctl00_ctl01" tabindex="-1" title="Workflow Tool : Specify your own value:" /></td>
Link to comment
Share on other sites

try with name upLevelDiv instead ID

!Edit: note that your trying to put something into DIV instead into input so i dont know will it work (divs aren't input fields)

so target your thing correctly and then try to set its value

Edited by bogQ

TCP server and client - Learning about TCP servers and clients connection
Au3 oIrrlicht - Irrlicht project
Au3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related)



460px-Thief-4-temp-banner.jpg
There are those that believe that the perfect heist lies in the preparation.
Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost.

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