Jump to content

IE Radio Button


Recommended Posts

I've read the documentation and several forum posts, and my code should be working, so I'm confused.

The source code:

<div class="Literal">List, approve or process Restock Orders (replenishment requests).
<input type="hidden" id="requestId" name="requestId" value="">
</div>
<div id="not_company_info">No data available for the selected company.</div>
<div class="tableContainer" id="all_info" >
<form method="post" name="restockForm" action = "restockManager_restockStep1.action" >
<table cellspacing="0" cellpadding="3" rules="all" border="1" id="apexTblDisplay" style="font-family:Verdana;width:100%;border-collapse:collapse;">
  <tr>
   <td width="200">Select a Company:</td>
   <td align="center"><div id="companySelect"></div></td>
  </tr>
  <tr >
   <td>Select a Site:</td>
   <td id="searchSiteTd">
          <select name='siteId' id='searchSiteId'  >
           <option value='NONE'>None</option>
          </select>
         </td>
  </tr>
  <tr >
   <td>Select an Action:</td>
   <td >
          <input type="radio" name="searchType" checked="checked" onclick="clisckSearchType()" value="APPROVE">Search for Restock Orders to approve.
          <br> <input type="radio" name="searchType" onclick="clisckSearchType()" value="RESTOCK">Search for Restock Orders to complete.
          <br> <input type="radio" name="searchType" onclick="clisckSearchType()" value="KEY_WORDS">Search for Restock Orders by Status, Date Range or Keyword.
          <div id ="key_words_div" style="display:none">
           <table cellspacing="0" cellpadding="3" rules="all" border="1" id="apexTblDisplay" style="font-family:Verdana;width:100%;border-collapse:collapse;">
            <tr><td>Restock Status:</td>
            <td>
             <select name='status' id='searchStatus'  >
              <option value='ALL'>ALL</option>
              <option value='INPROGRESS'>INPROGRESS</option>
              <option value='ORDERED'>ORDERED</option>
              <option value='RESTOCKED'>RESTOCKED</option>
              <option value='CANCELLED'>CANCELLED</option>
             </select>
             </td>
                </tr>
            <tr>
             <td>Date Range:</td>
             <td>
              <input type="text" name="beginDate" id="beginDate"/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;End Date:<input type="text" name="endDate" id="endDate"/>
             </td>
            </tr>
            <tr><td>Keyword:</td><td><input type="text" name="keyWords" id="keyWords" value="">
             (Customer #, Customer PO #, Restock Order #, Device Name, or Device SN)
             </td>
            </tr>
           </table>
          </div>
         </td>
  </tr>
  <tr >
   <td colspan="2" style="text-align:center">
          <input type="button" value="Search" onclick="search();">
         </td>
  </tr>
</table>
</form>
<div id="showPageData" ></div>
<div id="divWaiting" ></div>
</div>

My code:

Local $oForm = _IEFormGetObjByName ($oIE, "restockForm")
_IEFormElementRadioSelect($oForm, "RESTOCK", "searchType")

This code should be selecting the "Search for Restock Orders to complete." radio button, but it's not. Intermittently, I get a console error that says "Warning from function _IEFormElementRadioSelect, $_IEStatus_NoMatch"

Anyone see what I'm overlooking?

Link to comment
Share on other sites

Try ConsoleWrite(_IEPropertyGet($oForm, "outerhtml") to insure you are getting the form you expect. You also may have a page that is updating and you may want to add _IELoadWait($oIE) before your call.

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

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