HI Firat,
I am using it for for the whole select.

It is working fine out side logic iterate in normal html select when I tried as follws.
But in logic iterate I could not provide reference of name for select
like sampleSelect in indexed way like sampleSelectArray[index].sampleSelect 
dynamically.
Thank you for understanding.
-Udaya Allu

                <td>
                <select name="sampleSelect" disabled="true">
                        <option value="">Select Card</option>
                        <option value=""><b>Visa</b> xxxx-5678 10/2005</option>
                        <option value=""><b>Amex</b> xxxx-6854 12/2005</option>
                        <option value=""><b>Amex</b> xxxx-4211 10/2005</option>
                        <option value=""><b>Visa</b> xxxx-5678 10/2004</option>        
                                                         
            </select>
                </td>
<td align="center"><input type="checkbox" 
onclick="sampleSelect.disabled=this.checked?false:true"></td> 

-----Original Message-----
From: Firat TIRYAKI [mailto:[EMAIL PROTECTED]
Sent: Thursday, December 11, 2003 10:25 AM
To: Struts Users Mailing List
Subject: Re: problem in javascript for select enabled/disabled by
checkbox in a list with in logic iterate 


Well, sorry but you can't use the disabled property for one of a select
element's options, you can use it for the whole select.

F.

----- Original Message ----- 
From: "Udaya Allu" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, December 11, 2003 5:17 PM
Subject: problem in javascript for select enabled/disabled by checkbox in a
list with in logic iterate


Hi All,
Please help me on
select enabled/disabled by checkbox in a list with in logic iterate
I am not able to pass the index for disableing select box basing on check
box enale/disable
please look at  the code part
onclick="this.form.subscriptions['<%=index
%>'].selectedWalletItemId.disabled=this.checked?false:true;"
in the following code.
I tried it different ways ...but no success.
Other wise also if  I want to use simple onclick=" sumbit()", to do
something action class and refresh,
I do not know how to pass the index or other parameters through
Any amount of help is really appreciated as this is code in production.
Thank you
-Udaya Allu
<logic:iterate name="safeRenewForm" property="subscriptions"
id="subscriptions" indexId="index">
<td>
<html:select name="subscriptions" property="selectedWalletItemId"
indexed="true" onchange="alert(this.name);">
<html:option value="Select Credit Card">Select Credit Card</html:option>
<logic:iterate id="idx" name="safeRenewForm" property="walletItems"
indexId="index" >
<bean:define id="blah" name="idx" property="walletItemID"/>
<html:option value="<%= "" + blah %>">
<b><bean:write name="idx" property="tender.cardType.cardName"/></b>
   xxxx-<bean:write name="idx" property="tender.last4Digits"/>&nbsp;
<bean:write name="idx" property="tender.expMonth" />/<bean:write name="idx"
property="tender.expYear"/>
</html:option>
</logic:iterate>

    </html:select>
</td>
<td align="center"><html:checkbox name="subscriptions"
property="statusEnabled" indexed="true"
onclick="this.form.subscriptions['<%=index
%>'].selectedWalletItemId.disabled=this.checked?false:true;"/></td>
 <logic:iterate>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to