btnOK.Attributes.Add("OnClick", "selectVal(txtPlaceName)")
function selectVal(obj) { var val = obj.value; window.opener.document.forms.aspnetForm.ctl00$MainContent$txtPlace.value = val; window.close(); }
<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="WorkGroup.aspx.vb" Inherits="BankWeb.WorkGroup" %> <%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="asp" %> <asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server"> <script type = "text/javascript" > function popPlace() { window.open('popupPlace.aspx', 'popup', 'width=640,height=320,status=yes'); } </script> <style type="text/css"> .style1 { height: 21px; font-family: "Segoe UI"; font-size: xx-large; } .style8 { height: 50px; } .style9 { font-family: "Segoe UI"; font-size: x-large; } .style10 { height: 21px; width: 500px; } .style11 { width: 500px; } .style16 { height: 21px; } .style19 { width: 100px; } .style20 { width: 500px; height: 30px; } .style21 { width: 120px; } .style22 { font-family: "Segoe UI"; font-size: xx-large; } .style23 { height: 30px; } .style24 { height: 21px; width: 650px; } .style25 { width: 650px; } .style26 { height: 30px; } </style> </asp:Content> <asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server"> <asp:Panel ID="Panel1" runat="server"> <table style="width:100%; margin-bottom: 0px;"> <tr> <td class="style1" colspan="2"> <strong>เพิ่มล๊อตงาน</strong></td> </tr> <tr> <td class="style24"> <asp:Label ID="Label162" runat="server" Text="รหัสล๊อตงาน"></asp:Label> <asp:Label ID="lbWorkGroupID" runat="server"></asp:Label> </td> <td class="style10"> </td> </tr> <tr> <td class="style24"> <asp:Label ID="Label62" runat="server" Text="ชื่อล๊อตงาน"></asp:Label> <asp:TextBox ID="txtWorkGroupName" runat="server" Width="276px"></asp:TextBox> </td> <td class="style10"> </td> </tr> <tr> <td class="style25"> <asp:Label ID="Label63" runat="server" Text="วันที่สั่ง"></asp:Label> <asp:TextBox ID="txtStartDate" runat="server" Width="200px" ReadOnly="True"></asp:TextBox> <asp:Button ID="btnStartDate" runat="server" Text="เลือกวันที่" /> <br /> <asp:Calendar ID="calStart" runat="server" Visible="False" Width="400px"> </asp:Calendar> </td> <td class="style11"> <asp:Label ID="Label64" runat="server" Text="กำหนดส่ง"></asp:Label> <asp:TextBox ID="txtEndDate" runat="server" Width="200px" ReadOnly="True"></asp:TextBox> <asp:Button ID="btnEndDate" runat="server" Text="เลือกวันที่" /> <br /> <asp:Calendar ID="calEnd" runat="server" Visible="False" Width="400px"> </asp:Calendar> </td> </tr> <tr> <td class="style26"> <asp:Label ID="Label77" runat="server" Text="ผู้จำหน่าย"></asp:Label> <asp:DropDownList ID="ddlSale" runat="server" AutoPostBack="True"> </asp:DropDownList> </td> <td class="style20"> </td> </tr> <tr> <td class="style26"> <asp:Label ID="Label161" runat="server" Text="สถานที่"></asp:Label> <asp:TextBox ID="txtPlace" runat="server" Width="245px"></asp:TextBox> <asp:Button ID="btnSearchPlace" runat="server" Text="เลือกสถานที่" /> </td> <td class="style20"> </td> </tr> <tr> <td class="style26" colspan="2"> <span class="style22"><strong>รายการงาน</strong></span><asp:GridView ID="GridView2" runat="server" CellPadding="4" ForeColor="#333333" GridLines="None" Height="320px" Width="640px"> <AlternatingRowStyle BackColor="White" /> <EditRowStyle BackColor="#7C6F57" /> <FooterStyle BackColor="#1C5E55" Font-Bold="True" ForeColor="White" /> <HeaderStyle BackColor="#1C5E55" Font-Bold="True" ForeColor="White" /> <PagerStyle BackColor="#666666" ForeColor="White" HorizontalAlign="Center" /> <RowStyle BackColor="#E3EAEB" /> <SelectedRowStyle BackColor="#C5BBAF" Font-Bold="True" ForeColor="#333333" /> <SortedAscendingCellStyle BackColor="#F8FAFA" /> <SortedAscendingHeaderStyle BackColor="#246B61" /> <SortedDescendingCellStyle BackColor="#D4DFE1" /> <SortedDescendingHeaderStyle BackColor="#15524A" /> </asp:GridView> <br /> <asp:Button ID="Button18" runat="server" Text="แก้ไข" /> </td> </tr> <tr> <td class="style26"> <asp:Label ID="Label65" runat="server" Text="สังกัต"></asp:Label> <asp:TextBox ID="TextBox4" runat="server" Height="25px" Width="250px"></asp:TextBox> <asp:Button ID="Button3" runat="server" Text="เลือกสังกัต" /> </td> <td class="style20"> </td> </tr> <tr> <td class="style26"> <asp:Label ID="Label66" runat="server" Text="ชื่อลูกค้า"></asp:Label> <asp:TextBox ID="TextBox5" runat="server" Width="250px" Height="25px"></asp:TextBox> <asp:Button ID="Button4" runat="server" Text="เลือกลูกค้า" /> </td> <td class="style20"> </td> </tr> <tr> <td class="style25"> </td> <td class="style11"> </td> </tr> </table> </asp:Panel> <br /> รายการงาน<br /> <asp:Panel ID="Panel2" runat="server"> <table style="width:100%;"> <tr> <td class="style9" colspan="5"> <strong>ข้อมูลลูกค้า</strong></td> </tr> <tr> <td class="style8" colspan="5"> <asp:Label ID="Label67" runat="server" Text="ยศ"></asp:Label> <asp:DropDownList ID="DropDownList1" runat="server"> </asp:DropDownList> <asp:Button ID="Button5" runat="server" Text="เพิ่มยศ" /> </td> </tr> <tr> <td colspan="5"> <asp:Label ID="Label68" runat="server" Text="ชื่อ-สกุล"></asp:Label> <asp:TextBox ID="TextBox6" runat="server" Width="200px"></asp:TextBox> </td> </tr> <tr> <td colspan="5"> <asp:Label ID="Label78" runat="server" Text="สถานที่"></asp:Label> <asp:TextBox ID="TextBox10" runat="server" Width="200px"></asp:TextBox> </td> </tr> <tr> <td class="style16" colspan="5"> <asp:Label ID="Label70" runat="server" Text="E-mail"></asp:Label> <asp:TextBox ID="TextBox8" runat="server" Width="200px"></asp:TextBox> </td> </tr> <tr> <td colspan="5"> <asp:Label ID="Label71" runat="server" Text="เบอร์โทรศัพท์"></asp:Label> <asp:TextBox ID="TextBox9" runat="server" Width="200px"></asp:TextBox> </td> </tr> <tr> <td class="style19"> <asp:Label ID="Label72" runat="server" Text="Size"></asp:Label> </td> <td class="style21"> <asp:Label ID="Label73" runat="server" Text="เสื้อ"></asp:Label> </td> <td class="style21"> <asp:Label ID="Label74" runat="server" Text="กางเกง"></asp:Label> </td> <td class="style19"> <asp:Label ID="Label75" runat="server" Text="หมวก"></asp:Label> </td> <td class="style19"> <asp:Label ID="Label76" runat="server" Text="รองเท้า"></asp:Label> </td> </tr> <tr> <td class="style19"> </td> <td class="style21"> <asp:Label ID="Label94" runat="server" Text="อก"></asp:Label> <asp:TextBox ID="TextBox21" runat="server" Width="50px"></asp:TextBox> </td> <td class="style21"> <asp:Label ID="Label104" runat="server" Text="เอว"></asp:Label> <asp:TextBox ID="TextBox31" runat="server" Width="50px"></asp:TextBox> </td> <td class="style19"> <asp:Label ID="Label111" runat="server" Text="เบอร์"></asp:Label> <asp:TextBox ID="TextBox38" runat="server" Width="50px"></asp:TextBox> </td> <td class="style19"> <asp:Label ID="Label112" runat="server" Text="เบอร์"></asp:Label> <asp:TextBox ID="TextBox39" runat="server" Width="50px"></asp:TextBox> </td> </tr> <tr> <td class="style19"> </td> <td class="style21"> <asp:Label ID="Label95" runat="server" Text="ยาว"></asp:Label> <asp:TextBox ID="TextBox22" runat="server" Width="50px"></asp:TextBox> </td> <td class="style21"> <asp:Label ID="Label105" runat="server" Text="สะโพก"></asp:Label> <asp:TextBox ID="TextBox32" runat="server" Width="50px"></asp:TextBox> </td> <td class="style19"> </td> <td class="style19"> </td> </tr> <tr> <td class="style19"> </td> <td class="style21"> <asp:Label ID="Label96" runat="server" Text="ไหล่"></asp:Label> <asp:TextBox ID="TextBox23" runat="server" Width="50px"></asp:TextBox> </td> <td class="style21"> <asp:Label ID="Label106" runat="server" Text="เป้า"></asp:Label> <asp:TextBox ID="TextBox33" runat="server" Width="50px"></asp:TextBox> </td> <td class="style19"> </td> <td class="style19"> </td> </tr> <tr> <td class="style19"> </td> <td class="style21"> <asp:Label ID="Label97" runat="server" Text="แขนยาว"></asp:Label> <asp:TextBox ID="TextBox24" runat="server" Width="50px"></asp:TextBox> </td> <td class="style21"> <asp:Label ID="Label107" runat="server" Text="ความยาว"></asp:Label> <asp:TextBox ID="TextBox34" runat="server" Width="50px"></asp:TextBox> </td> <td class="style19"> </td> <td class="style19"> </td> </tr> <tr> <td class="style19"> </td> <td class="style21"> <asp:Label ID="Label98" runat="server" Text="วงแขน"></asp:Label> <asp:TextBox ID="TextBox25" runat="server" Width="50px"></asp:TextBox> </td> <td class="style21"> <asp:Label ID="Label108" runat="server" Text="โคนขา"></asp:Label> <asp:TextBox ID="TextBox35" runat="server" Width="50px"></asp:TextBox> </td> <td class="style19"> </td> <td class="style19"> </td> </tr> <tr> <td class="style19"> </td> <td class="style21"> <asp:Label ID="Label99" runat="server" Text="ศอก"></asp:Label> <asp:TextBox ID="TextBox26" runat="server" Width="50px"></asp:TextBox> </td> <td class="style21"> <asp:Label ID="Label109" runat="server" Text="เข่า"></asp:Label> <asp:TextBox ID="TextBox36" runat="server" Width="50px"></asp:TextBox> </td> <td class="style19"> </td> <td class="style19"> </td> </tr> <tr> <td class="style19"> </td> <td class="style21"> <asp:Label ID="Label100" runat="server" Text="ข้อมือ"></asp:Label> <asp:TextBox ID="TextBox27" runat="server" Width="50px"></asp:TextBox> </td> <td class="style21"> <asp:Label ID="Label110" runat="server" Text="ปลายขา"></asp:Label> <asp:TextBox ID="TextBox37" runat="server" Width="50px"></asp:TextBox> </td> <td class="style19"> </td> <td class="style19"> </td> </tr> <tr> <td class="style19"> </td> <td class="style21"> <asp:Label ID="Label101" runat="server" Text="เอว"></asp:Label> <asp:TextBox ID="TextBox28" runat="server" Width="50px"></asp:TextBox> </td> <td class="style21"> </td> <td class="style19"> </td> <td class="style19"> </td> </tr> <tr> <td class="style19"> </td> <td class="style21"> <asp:Label ID="Label102" runat="server" Text="สะโพก"></asp:Label> <asp:TextBox ID="TextBox29" runat="server" Width="50px"></asp:TextBox> </td> <td class="style21"> </td> <td class="style19"> </td> <td class="style19"> </td> </tr> <tr> <td class="style19"> </td> <td class="style21"> <asp:Label ID="Label103" runat="server" Text="คอ"></asp:Label> <asp:TextBox ID="TextBox30" runat="server" Width="50px"></asp:TextBox> </td> <td class="style21"> </td> <td class="style19"> </td> <td class="style19"> </td> </tr> <tr> <td class="style19"> </td> <td class="style21"> </td> <td class="style21"> </td> <td class="style19"> </td> <td class="style19"> </td> </tr> </table> </asp:Panel> <br /> <span class="style22"><strong>รายการสั่งซื้อ</strong></span><asp:GridView ID="GridView1" runat="server" BackColor="White" BorderColor="White" BorderStyle="Ridge" BorderWidth="2px" CellPadding="3" CellSpacing="1" GridLines="None" Height="320px" Width="640px"> <FooterStyle BackColor="#C6C3C6" ForeColor="Black" /> <HeaderStyle BackColor="#4A3C8C" Font-Bold="True" ForeColor="#E7E7FF" /> <PagerStyle BackColor="#C6C3C6" ForeColor="Black" HorizontalAlign="Right" /> <RowStyle BackColor="#DEDFDE" ForeColor="Black" /> <SelectedRowStyle BackColor="#9471DE" Font-Bold="True" ForeColor="White" /> <SortedAscendingCellStyle BackColor="#F1F1F1" /> <SortedAscendingHeaderStyle BackColor="#594B9C" /> <SortedDescendingCellStyle BackColor="#CAC9C9" /> <SortedDescendingHeaderStyle BackColor="#33276A" /> </asp:GridView> <br /> <asp:Button ID="Button7" runat="server" Text="เพิ่มรายการสั่งซื้อ" /> <asp:Button ID="Button8" runat="server" Text="พิมพ์ใบ Size" /> <asp:Button ID="Button17" runat="server" Text="แก้ไข" /> <br /> <br /> <asp:Panel ID="Panel3" runat="server"> <table style="width:100%;"> <tr> <td class="style9"> <strong>เพิ่มรายการสั่งซื้อ</strong></td> </tr> <tr> <td class="style23"> <asp:Label ID="Label113" runat="server" Text="ประเภท"></asp:Label> <asp:DropDownList ID="DropDownList3" runat="server" Height="16px" Width="200px"> </asp:DropDownList> </td> </tr> <tr> <td class="style23"> <asp:Label ID="Label143" runat="server" Text="ชื่อผลิตภัณฑ์"></asp:Label> <asp:DropDownList ID="DropDownList4" runat="server" Height="16px" Width="200px"> </asp:DropDownList> </td> </tr> <tr> <td class="style23"> <asp:Label ID="Label144" runat="server" Text="ชนิดผ้า"></asp:Label> <asp:DropDownList ID="DropDownList5" runat="server" Height="16px" Width="200px"> </asp:DropDownList> </td> </tr> <tr> <td class="style23"> <asp:Panel ID="Panel4" runat="server"> <table style="width: 100%;"> <tr> <td class="style23"> <asp:CheckBox ID="CheckBox1" runat="server" Text="เสื้อ" /> <asp:TextBox ID="TextBox40" runat="server" Width="50px"></asp:TextBox> <asp:Label ID="Label151" runat="server" Text="ตัว"></asp:Label> <asp:CheckBox ID="CheckBox2" runat="server" Text="กางเกง" /> <asp:TextBox ID="TextBox41" runat="server" Width="50px"></asp:TextBox> <asp:Label ID="Label152" runat="server" Text="ตัว"></asp:Label> </td> </tr> </table> </asp:Panel> </td> </tr> <tr> <td class="style23"> <asp:Panel ID="Panel5" runat="server"> <table style="width: 100%;"> <tr> <td class="style23"> <asp:Label ID="Label153" runat="server" Text="จำนวน"></asp:Label> <asp:TextBox ID="TextBox42" runat="server" Width="50px"></asp:TextBox> </td> </tr> </table> </asp:Panel> </td> </tr> <tr> <td class="style23"> <asp:Button ID="Button9" runat="server" Text="บันทึกรายการสั่งซื้อ" /> <asp:Button ID="Button10" runat="server" Text="ยกเลิก" /> </td> </tr> </table> </asp:Panel> <br /> <asp:Panel ID="Panel6" runat="server"> <table style="width:100%;"> <tr> <td class="style9"> <asp:Label ID="Label157" runat="server" Text="ราคารวม"></asp:Label> <asp:TextBox ID="TextBox43" runat="server" Width="150px"></asp:TextBox> <asp:Label ID="Label158" runat="server" Text="บาท"></asp:Label> </td> </tr> <tr> <td class="style9"> <asp:Label ID="Label159" runat="server" Text="มัดจำ"></asp:Label> <asp:TextBox ID="TextBox44" runat="server" Width="150px"></asp:TextBox> <asp:Label ID="Label160" runat="server" Text="บาท"></asp:Label> </td> </tr> <tr> <td class="style9"> หมายเหตุ<br /> <asp:TextBox ID="TextBox46" runat="server" Height="177px" Width="509px"></asp:TextBox> </td> </tr> <tr> <td class="style9"> <asp:Button ID="Button16" runat="server" Text="บันทึกรายการงาน" /> </td> </tr> <tr> <td class="style9"> <asp:Button ID="Button11" runat="server" Text="บันทึก" /> <asp:Button ID="Button12" runat="server" Text="พิมพ์ใบสั่งผลิต" /> <asp:Button ID="Button13" runat="server" Text="พิมพ์ใบสรุปรายการ" /> <asp:Button ID="Button14" runat="server" Text="กลับหน้าหลัก" /> </td> </tr> </table> </asp:Panel> <br /> </asp:Content>
window.opener.document.forms.aspnetForm.ctl00$MainContent$txtPlace.value = val;
btnOK.Attributes.Add("OnClick", "selectVal(" & Me.txt.ClientID & ")")
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง