Hi
I need to call a function when an image iss clicked andt send 2 parameters , the name of the control that indicate the item ID and the name of the control that have the item's Description I wanna do something like this:
onclick="javascript:fHelpItm('txt_CodItem', 'txtNomItem', true)"
The thing is that "txt_CodItem" is a control within a datagrid's row, and becomes alive when the Datagrid goes into the edition state.
This is the part of the datagrid that create the "txtCodItem" and call the funcion
===================
<EditItemTemplate>
<asp:TextBox id="txt_CodItem" runat="server" Width="87px">0</asp:TextBox>
<IMG id="imgBuscar" onclick="javascript:fHelpItm('txt_CodItem', 'txtNomItem', true)" src="../Images/iconBuscar.jpg">
<P class="frmLnk" onclick="javascript:fHelp('<%=txt_CodItem.ClientID %>', '<%=txtNomItem.clientID%>', true)" align="right">Cód</P>
</EditItemTemplate>
=====================
like you can see on the above's code I've try on two diferent ways, one with an IMG and the other with a link and It does not work!!!
I receive this error
====================================
Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: BC30451: Name 'txt_CodItem' is not declared.
Source Error:
Line 87: <EditItemTemplate>
Line 88: <asp:TextBox id="txt_CodItem" runat="server" Width="87px">0</asp:TextBox><IMG id="imgBuscar" onclick="javascript:fHelpItm('txt_CodItem', 'txtNomItem', true)" src="../Images/iconBuscar.jpg">
Line 89: <P class="frmLnk" onclick="javascript:fHelpItm('<%=txt_CodItem.Clien tID%>', '<%=txtNomItem.clientID%>', true)" align="right">Cód</P>
Line 90: </EditItemTemplate>
Line 91: </asp:TemplateColumn>
THANKSS A LOTTTTTT FOR ANY HELP!!!
Sergio
PD: sorry for my english