Hi Sir
I have a problem in passing value from Popop to main page
I am using Master page and aspx page
From main page, i can open popup windows and populate data in gridview. I am selecting date and capture the valeu in TextBox. When I click the button nothing happened. It shows popup windows only.. Pls advise me
Thank you.
Maideen
It is my Code - Popup
<body>
<form id="form1" runat="server">
<asp:Label ID="Label1" runat="server" Text="Select Item Name"></asp:Label>
<asp:TextBox ID="txtSearch" runat="server"></asp:TextBox>
<asp:Button ID="btnSearch" runat="server" Text="Search" />
<asp:TextBox ID="txtItemName" runat="server"></asp:TextBox>
<asp:Button ID="btnSelectItem" runat="server" Text="select Item" OnClientClick="SetName();" />
<div>
<script type="text/javascript">
function SetName() {
if (window.opener != null && !window.opener.closed) {
var txtItemID = window.opener.document.getElementById("txtItemID");
txtItemID.value = document.getElementById("txtItemName").value;
}
window.close();
}
</script>
<br />
<asp:GridView ID="GridView1" runat="server" CssClass="gridview" AutoGenerateColumns="False" BackColor="White" BorderColor="#E7E7FF" BorderStyle="None"
BorderWidth="1px" CellPadding="3" GridLines="Horizontal" PageSize="15" Font-Names="Calibri" Font-Size="Small">
<AlternatingRowStyle BackColor="#F7F7F7" />
<Columns>
<asp:CommandField ShowSelectButton="True">
<ItemStyle Width="50px" />
</asp:CommandField>
<asp:BoundField DataField="id" InsertVisible="False" ReadOnly="True" SortExpression="id" Visible="true" HeaderText="ID"/>
<asp:BoundField DataField="itemid" HeaderText="Item Code"/>
<asp:BoundField DataField="itemdes" HeaderText="Description"/>
<asp:BoundField DataField="Category" HeaderText="Category"/>
<asp:BoundField DataField="uom" HeaderText="UOM"/>
<asp:BoundField DataField="Suppprice" HeaderText="SuppPrice"/>
<asp:BoundField DataField="taxcode" HeaderText="Tax Code"/>
</Columns>
<FooterStyle BackColor="#B5C7DE" ForeColor="#4A3C8C" />
<HeaderStyle BackColor="#4A3C8C" Font-Bold="True" ForeColor="#F7F7F7" />
<PagerStyle BackColor="#E7E7FF" ForeColor="#4A3C8C" HorizontalAlign="Right" />
<RowStyle BackColor="#E7E7FF" ForeColor="#4A3C8C" />
<SelectedRowStyle BackColor="#738A9C" Font-Bold="True" ForeColor="#F7F7F7" />
<SortedAscendingCellStyle BackColor="#F4F4FD" />
<SortedAscendingHeaderStyle BackColor="#5A4C9D" />
<SortedDescendingCellStyle BackColor="#D8D8F0" />
<SortedDescendingHeaderStyle BackColor="#3E3277" />
</asp:GridView>
</div>
</form>
</body>