You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Dheeraj Singh <Dh...@iffcotokio.co.in> on 2010/06/21 14:09:56 UTC

Problem in passing value to javascript function call onclick of

Hi All,

My apology if this message is mailed to wrong forum.

As per requirements, I am showing a list of vehicle makes on the page in 
table format. Every row has three buttons (Edit, Delete, Purge) along with 
make details. I have called javascript method setMakeCode(this.form, 
makeCode) on each buttons. The value of agrument makeCode value is 
dynamically is picked from bean and it is here I am facing problem to pass 
the value inside the <html:submit> tag.

My code is as follows:

<logic:iterate id="makeBean" name="MakeList">
        <bean:define id="makeCoe" name="makeBean" property="makeCode"></
bean:define>
        <tr>
                <td><bean:write name="makeBean" property="makeCode" /></td
>
                <td><bean:write name="makeBean" property="manufacture" 
/></td>
                <td><bean:write name="makeBean" property="model" /></td>
                <td class="text-align-center"><bean:write name="makeBean" 
property="active" /></td>
                <td class="text-align-center">
                        <html:submit property="details"value="Edit"onclick
="setMakeCode(this.form, '${makeCoe}')" />&nbsp;
                        <html:submit property="delete"value="Delete"
onclick="setMakeCode(this.form, '%{makeCoe}')" />&nbsp;
                        <html:submit property="purge" value="Purge"onclick
="setMakeCode(this.form, '${makeCoe}')" />
                </td>
        </tr>
</logic:iterate>

Inside the javascript method the passed value makeCode is assigned to a 
<html:hidden property="makeCode">. So what I am trying to pass the set the 
makeCode in hidden field before submitting the form values.

Please help.

Thanks & Regards,
Dheeraj Singh
IFFCO-TOKIO General Insurance Co. Ltd.
IFFCO Tower 4th Floors, 
Plot No. 3, Sector- 29, Gurgaon - 122001.
Phone No: +91-124-2850100, Extn.-381
Mobile: +91-9910108940
http://www.iffcotokio.co.in/
**********************************************************************************************************************************************************************
The contents of this e-mail and any attachment(s) are confidential and 
intended for the named recipient(s) only.  It shall not attach any 
liability on the originator or ITGI or its affiliates. Any views or 
opinions presented in  this email are solely those of the author and may 
not necessarily reflect the opinions of ITGI or its affiliates.  Any form 
of reproduction, dissemination, copying, disclosure, modification, 
distribution and / or publication of  this message without the prior 
written consent of the author of this e-mail is strictly prohibited. If 
you have  received this email in error please delete it and notify the 
sender immediately. Before opening any mail and  attachments please check 
them for viruses and defect. 
**********************************************************************************************************************************************************************
Disclaimer
**********************************************************
The contents of this e-mail and any attachment(s) are
confidential and intended for the named recipient(s) only. 
It shall not attach any liability on the originator or
IFFCO TOKIO Genral Insurance or its affiliates. Any views
or opinions presented in this email are solely those of the
author and may not necessarily reflect the opinions of
IFFCO TOKIO Genral Insurance or its affiliates.  Any form
of reproduction, dissemination, copying, disclosure,
modification, distribution and / or publication of this
message without the prior written consent of the author of
this e-mail is strictly prohibited. If you have received
this email in error please delete it and notify the sender
immediately. Before opening any mail and attachments please
check them for viruses and defect.
***********************************************************