Jump to content
Sign in to follow this  
levila

Tick Check Box in IE

Recommended Posts

Guys rly need your help on this, i tried to tick check box on using coding below on internal website page, but still cant get to tick the box,

i already use this method on select dropdown menu and input blank field, but seem no issue. but i stuck with check box, kindly appreciate for your help.

Local $csvInputs = _IETagNameGetCollection($aIE, "Input")
For $csvInput In $csvInputs
    If $csvInput.name = 'need_csv' Then _IEFormElementCheckBoxSelect($csvInput, 1, "true", 1, "byValue")
Next

this is the inspect source of checkbox

<input type="checkbox" name="need_csv" value="true">

i hope this details above help xD 

Share this post


Link to post
Share on other sites
Spoiler
<form method="post" enctype="application/x-www-form-urlencoded">
  <fieldset>
  <legend class="title">Call Detail Record Search</legend>
  <table width="100%">
  <tr>
  <th>Order By</th>
  <th>Search Conditions</th>
  <th>&nbsp;</th>
  </tr>
  <tr>
  <td><input checked="checked" type="radio" name="order" value="calldate" />&nbsp;<label for='order'><a href="#" class="info">Call Date<span>Select time span for your report. You can select Date, Month, Year, Hour and Minute to narrow your search</span></a>:</label></td>
  <td>From:
  <input type="text" name="startday" id="startday" size="2" maxlength="2" value="01" />
  <select name="startmonth" id="startmonth">
  <option value="01" selected="selected">January</option>
  <option value="02">February</option>
  <option value="03">March</option>
  <option value="04">April</option>
  <option value="05">May</option>
  <option value="06">June</option>
  <option value="07">July</option>
  <option value="08">August</option>
  <option value="09">September</option>
  <option value="10">October</option>
  <option value="11">November</option>
  <option value="12">December</option>
  </select>
  <select name="startyear" id="startyear">
  <option value="2000">2000</option>
  <option value="2001">2001</option>
  <option value="2002">2002</option>
  <option value="2003">2003</option>
  <option value="2004">2004</option>
  <option value="2005">2005</option>
  <option value="2006">2006</option>
  <option value="2007">2007</option>
  <option value="2008">2008</option>
  <option value="2009">2009</option>
  <option value="2010">2010</option>
  <option value="2011">2011</option>
  <option value="2012">2012</option>
  <option value="2013">2013</option>
  <option value="2014">2014</option>
  <option value="2015">2015</option>
  <option value="2016">2016</option>
  <option value="2017">2017</option>
  <option value="2018">2018</option>
  <option value="2019" selected="selected">2019</option>
  </select>
  <input type="text" name="starthour" id="starthour" size="2" maxlength="2" value="00" />:
  <input type="text" name="startmin" id="startmin" size="2" maxlength="2" value="00" />To:
  <input type="text" name="endday" id="endday" size="2" maxlength="2" value="31" />
  <select name="endmonth" id="endmonth">
  <option value="01" selected="selected">January</option>
  <option value="02">February</option>
  <option value="03">March</option>
  <option value="04">April</option>
  <option value="05">May</option>
  <option value="06">June</option>
  <option value="07">July</option>
  <option value="08">August</option>
  <option value="09">September</option>
  <option value="10">October</option>
  <option value="11">November</option>
  <option value="12">December</option>
  </select>
  <select name="endyear" id="endyear">
  <option value="2000">2000</option>
  <option value="2001">2001</option>
  <option value="2002">2002</option>
  <option value="2003">2003</option>
  <option value="2004">2004</option>
  <option value="2005">2005</option>
  <option value="2006">2006</option>
  <option value="2007">2007</option>
  <option value="2008">2008</option>
  <option value="2009">2009</option>
  <option value="2010">2010</option>
  <option value="2011">2011</option>
  <option value="2012">2012</option>
  <option value="2013">2013</option>
  <option value="2014">2014</option>
  <option value="2015">2015</option>
  <option value="2016">2016</option>
  <option value="2017">2017</option>
  <option value="2018">2018</option>
  <option value="2019" selected="selected">2019</option>
  </select>
  <input type="text" name="endhour" id="endhour" size="2" maxlength="2" value="23" />:
  <input type="text" name="endmin" id="endmin" size="2" maxlength="2" value="59" />
  </td>
  <td rowspan="10" valign='top' align='right'>
  <fieldset>
  <legend class="title">Extra Options</legend>
  <table>
  <tr>
  <td><label for="Report Type">Report Type : </label></td>
  <td>
  <input checked="checked" type="checkbox" name="need_html" value="true" /> : CDR search<br />
  <input type="checkbox" name="need_csv" value="true" /> : CSV File<br/>
  <input type="checkbox" name="need_chart" value="true" /> : Call Graph<br />

full html

some how i cant get form value, help :(

Share this post


Link to post
Share on other sites

You could try and create a form collection and then use the index of the form or one of the following may work:

$oCheckBox = _IEGetObjByName($oIE, "need_csv")
_IEAction($oCheckBox, "click")

;~ Or

$oCheckBox = _IEGetObjByName($oIE, "need_chart")
_IE_CheckBox($oCheckBox, 1)

Func _IE_CheckBox($oItem, $iState = 1)
    Switch $iState
        Case 0
            If $oItem.checked Then $oItem.checked = False
        Case 1
            If Not $oItem.checked Then $oItem.checked = True
    EndSwitch
EndFunc

 

Share this post


Link to post
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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...