Display a popup window, then return product code i

Discussion in 'ASP.NET / ASP.NET Core' started by nhu_twwshh, Jun 28, 2004.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. Hi, all
    I'm new in ASP.Net. I have a web page (frmInvoice.aspx) with a disabled text box to displat product code. Next to text box, I have a command button to choose more... When I click on this button, It opens a pop up window (frmProductList.aspx) , list all products (using datagrid). Then when user click on product code hyperlink, it returns this value to text box of parent form.

    *** frmInvoice.aspx
    function returnProductCode(productCD)
    {
    document.frmInvoice.txtProductCD.value = productCD
    }

    <asp:textbox id="txtProductCD" tabIndex="6" runat="server" Enabled="False" Width="160px"></asp:textbox>

    *** frmProductList.aspx
    <SCRIPT language="javascript">
    function ReturnCode(strCode)
    {
    window.opener.returnProductCode(strCode)
    window.close();
    }
    </SCRIPT>

    <asp:HyperLink runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.Product_CD") %>' NavigateURL ='<%# DataBinder.Eval(Container, "DataItem.Product_CD") %>' OnClick="ReturnCode('I want to return to product code of selected row');" ID="txtProduct" NAME="txtProduct">

    As you see, I want to return product code in ReturnCode function
    OnClick="ReturnCode('<%# DataBinder.Eval(Container, "DataItem.Product_CD") %>');"
    However, this statement cause an error.
    Pls help me!!! Help me.
    Thanks a lot.
    nhu
     
Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.

Share This Page