Jump to content

IE Radio Button doesn't work


Recommended Posts

i have a problem with this Radio Button and i don't know where i'm going wrong

this is html code

CODE
<form NAME="FormS" METHOD=POST ACTION="/www.xxx.xxx /" onsubmit="java script:RicercaS();return false;">

<input type="hidden" name="tipoRicerca" value=2>

<input type="hidden" name="FMercatoT" value="XXX">

<table border="0" cellspacing="0" cellpadding="0" width="570" bgcolor=#EBEBEB>

<tr><td colspan="5" height="25" class="TitoloF">&nbsp;SCEGLI pinco pall</td></tr>

<tr><td colspan="5" bgcolor="#FFFFFF"></td>

<tr>

<td width="150" align="right" class="formsx">Titolo:</td>

<td width="150" height="25" class="formdx">&nbsp;&nbsp;&nbsp;<input type="text" name="FTitolo" size="20"></td>

<td width="70" class="formdx"><input type="radio" name="CodNome" value="1">&nbsp;Codice</td>

<td width="70" class="formdx"><input type="radio" name="CodNome" value="2" checked>&nbsp;Nome</td>

<td width="130" align="right" >

<a href="java script:RicercaS();" class="lnk2y">

<img src="/img/b1_vai.gif" width="31" height="13" border="0"></a>&nbsp;&nbsp;</td>

</tr>

</table>

</form>

there are two radio button and the second is automatically select(value2).

i need to select the first(with value 1)

this is my last script but it doesn't work

CODE
$oIE = _IECreate ("www....com",0,1,1,1)

$oCodNome = _IEFormGetObjByName ($oIE, "FormS")

_IEFormElementRadioSelect ($oCodNome, 2, "CodNome", 1, "byIndex")

sorry if it's a stupid question

i try in several ways but i can't understand where i'm going wrong!

thanks all

Link to comment
Share on other sites

$oIE = _IECreate ("www....com",0,1,1,1)
$oCodNome = _IEFormGetObjByName ($oIE, "FormS")

_IEFormElementRadioSelect ($oCodNome, 2, "CodNome", 1, "byValue") ; Maybe ByValue?

you are right..

i made a mistake when i copied. the original is

_IEFormElementRadioSelect ($oCodNome, "1", "CodNome", 1, "byValue")

Link to comment
Share on other sites

  • 1 month later...

I have a similar question. I can not select the radio button in a table of the frame. Could someone help me to solve it? thx a lot.

CODE

.

.

.

<table id="soOrderTable">

<tbody>

<tr class="title_line">

<td>

<input type="radio" name="soOSelectBS" value="B" checked="checked" onclick="SingleOrderPageOperation.onclickEvents.ClickSoOSelectBS(this);" /><label>Buy</label>

<input type="radio" name="soOSelectBS" value="S" onclick="SingleOrderPageOperation.onclickEvents.ClickSoOSelectBS(this);" /><label>Sell</label>

</td>

</tr>

<tr class="title_line">

.

.

.

I've tried a lot differet ways to control the elements in the table, It is ok if there is a element Id by using _IEGetObjById, but I don't know how to control radio in the table. This website is coded by javascript. thx a lot again.

CODE
$oFrame = _IEFrameGetObjByName ($oIE, "SingleOrderPage_content")

_IEFormElementRadioSelect ($oFrame, "S", "soOSelectBS", 1, "byValue")

Edited by Hugochen48
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...