Register Register Member Login Member Login Member Login Forgot Password ??
PHP , ASP , ASP.NET, VB.NET, C#, Java , jQuery , Android , iOS , Windows Phone
 

Registered : 109,027

HOME > ASP > ASP Forum > clear form หลังจากที่ submit แล้วทำยังไงค่ะ รบกวนขอคำแนะนำเกี่ยวกับเรื่องนี้หน่อยค่ะ ต้องการเคลียร์ค่าใน list menu หลังจากที่ได้ submit



 

clear form หลังจากที่ submit แล้วทำยังไงค่ะ รบกวนขอคำแนะนำเกี่ยวกับเรื่องนี้หน่อยค่ะ ต้องการเคลียร์ค่าใน list menu หลังจากที่ได้ submit

 



Topic : 034325

Guest




รบกวนขอคำแนะนำเกี่ยวกับเรื่องนี้หน่อยค่ะ

ต้องการเคลียร์ค่าใน list menu หลังจากที่ได้ submit form (กด ปุ่ม search) ไปแล้ว
แต่ว่าให้ค่าของการค้นหายังอยู่
โดยให้เคลียร์เฉพาะ form ทำยังไงด้วยวิธีไหนบ้างค่ะ


A


การแสดงผลที่ต้องการคือแบบนี้ค่ะ

B


ขอบคุณล่วงหน้าสำหรับคำตอบค่ะ



Tag : - - - -







Move To Hilight (Stock) 
Send To Friend.Bookmark.
Date : 2009-11-13 10:03:23 By : poyz-say-hi View : 1944 Reply : 2
 

 

No. 1



โพสกระทู้ ( 11,835 )
บทความ ( 10 )

สมาชิกที่ใส่เสื้อไทยครีเอท Hall of Fame 2012

สถานะออฟไลน์


เอาโค๊ดตรงปุ่ม search มาดูครับ






Date : 2009-11-13 10:32:18 By : plakrim
 


 

No. 2

Guest


<title>search</title>
<meta http-equiv="Content-Type" content="text/html; charset=windows-874">
</head>

<body bgcolor="#E4E4E4">
<%
if Request.QueryString("z0")= "z" then
xAct =Request.QueryString("x0")'ตัวแปรเก็บค่าจากตัวเลือกในฟอร์ม
xDoctype = Request.QueryString("x1")
xSubtype = Request.QueryString("x2")
xSubsubtype = Request.QueryString("x3")
xProject = Request.QueryString("x4")
xCreator = Request.QueryString("x5")
xVendor = Request.QueryString("x6")
xDocnumber = Request.QueryString("x7")
xTitle = Request.QueryString("x8")

xArea = Request.QueryString("x9")
xUnit = Request.QueryString("x10")
xTagType = Request.QueryString("x11")
xTag = Request.QueryString("x12")
xManuf = Request.QueryString("x13")
xModel = Request.QueryString("x14")

xDate1 = Request.QueryString("x15")
xDate2 = Request.QueryString("x16")
else

xAct =Request.Form("Act")'ตัวแปรเก็บค่าจากตัวเลือกในฟอร์ม
xDoctype = Request.Form("Doc_type")
xSubtype = Request.Form("Subtype")
xSubsubtype = Request.Form("Subsubtype")
xProject = Request.Form("Project")
xCreator = Request.Form("Creator")
xVendor = Request.Form("Vendor")
xDocnumber = Request.Form("Doc_number")
xTitle = Request.Form("Title")


xArea = Request.Form("Area")
xUnit = Request.Form("unit")
xTagType = Request.Form("Tagtype")
xTag = Request.Form("Tag")
xManuf = Request.Form("Manuf")
xModel = Request.Form("model")

xDate1 = Request.Form("Date1")
xDate2 = Request.Form("Date2")

end if

Set adocon = Server.CreateObject("ADODB.Connection") 'ประกาศตัวแปร adocon เป็นตัวแปร object connectio จะเรียก ,method open ที่ใช้ติดต่อฐาน DigitalLibrary.accdb
' strCon = "Provider=Microsoft.ACE.OLEDB.12.0; Data Source=" & server.MapPath("srieng02/wwwroot/DIGITALLIBRARY/DigitalLibrary2007.accdb") 'This one is for Access 2000/2002
strCon = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & Server.MapPath("DigitalLibrary2003.mdb") 'This one is for Access 2000/2002
' strCon = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & Server.MapPath("srieng02\Engineer\DigitalLibrary\DigitalLibrary2003.mdb") 'This one is for Access 2000/2002
%>
<form action="search.asp" method="post" name="search" target="_self" id="search">
<table width="100%" border="0">
<tr>
<td><strong><font size="5"color="#0033FF">Document Search</font></strong>
<hr align="left" color="#333333" size="4" width="50%" > </td>
</tr>
</table>
<table width="100%" border="0">
<tr>
<td><strong> <strong><font color="#5CB900" size="4">Detail</font></strong>
</strong><strong></strong><strong></strong><strong></strong><strong></strong></td>
<td colspan="3">&nbsp;</td>
<td colspan="2"><strong><font color="#5CB900" size="4">Link</font></strong><strong></strong></td>
</tr>
<tr>
<td width="14%"><strong><font size="2">Document Type</font></strong></td>
<td width="20%"> <strong><font color="#0000FF" size="4">
<select style='width=130px' id=Doc_type name=Doc_type >
<option><%=xDoctype%></option>
<%
xsql = "select distinct(doc_type) "
xsql = xsql & " from s_elib_docmast "
xsql = xsql & " order by doc_type "
Set rx = Server.CreateObject("ADODB.Recordset")
rx_SQL = xsql
rx.Open rx_SQL, strCon,1,3
If rx.RecordCount <> 0 Then
rx.MoveFirst
Do While Not rx.EOF
%>
<option><%=rx("doc_type")%></option>

<%
rx.Movenext
Loop
rx.close
End if
%>

</select>
</font></strong>>
</td>
<td width="17%"><select style='width=120px' id=select3 name=subtype >
<option><%=xSubtype%></option>
<%
xsql = "select distinct(sub_type) "
xsql = xsql & " from s_elib_docmast "
xsql = xsql & " order by sub_type "
Set rx = Server.CreateObject("ADODB.Recordset")
rx_SQL = xsql
rx.Open rx_SQL, strCon,1,3
If rx.RecordCount <> 0 Then
rx.MoveFirst
Do While Not rx.EOF
%>
<option><%=rx("sub_type")%></option>
<%
rx.Movenext
Loop
rx.close
End if
%>

</select>
&gt;&gt; </td>
<td width="15%"><select style='width=120px' id=select33 name=Subsubtype >
<option><%=xSubsub_type%></option>
<%
xsql = "select distinct(Subsub_type) "
xsql = xsql & " from s_elib_docmast "
xsql = xsql & " order by Subsub_type "
Set rx = Server.CreateObject("ADODB.Recordset")
rx_SQL = xsql
rx.Open rx_SQL, strCon,1,3
If rx.RecordCount <> 0 Then
rx.MoveFirst
Do While Not rx.EOF
%>
<option><%=rx("Subsub_type")%></option>
<%
rx.Movenext
Loop
rx.close
End if
%>

</select> <font size="2">&nbsp;</font><font size="2">&nbsp;</font><font size="2">&nbsp;</font><font size="2">&nbsp;</font></td>
<td><font size="2">&nbsp;<strong>Area</strong></font></td>
<td width="22%" colspan="2"><font size="2">
<select style='width=180px' id=select27 name=Area>
<option><%=xArea%></option>
<%
xsql = "select distinct(link_key) "
xsql = xsql & " from s_elib_doclink where inuse ='T' and (link_type = 'AREA' or link_type is null) "
xsql = xsql & " order by link_key "
Set rx = Server.CreateObject("ADODB.Recordset")
rx_SQL = xsql
rx.Open rx_SQL, strCon,1,3
If rx.RecordCount <> 0 Then

Do While Not rx.EOF
%>
<option><%=rx("link_key")%></option>
<%
rx.Movenext
Loop
rx.close
End if
%>

</select>
</font></td>
</tr>
<tr>
<td><strong><font size="2">Project Number</font></strong></td>
<td colspan="3"><select style='width=316px' id=select34 name=Project >
<option><%=xProject%></option>
<%
xsql = "select distinct(project) "
xsql = xsql & " from s_elib_docmast "
xsql = xsql & " order by project "
Set rx = Server.CreateObject("ADODB.Recordset")
rx_SQL = xsql
rx.Open rx_SQL, strCon,1,3
If rx.RecordCount <> 0 Then
rx.MoveFirst
Do While Not rx.EOF
%>
<option><%=rx("project")%></option>
<%
rx.Movenext
Loop
rx.close
End if
%>

</select> <font size="2">&nbsp;</font><font size="2">&nbsp;</font><font size="2">&nbsp;</font></td>
<td width="12%"><font size="2">&nbsp;<strong>Unit</strong></font></td>
<td colspan="2"><font size="2">
<select style='width=180px' id=select26 name=unit>
<option><%=xUnit%></option>
<%
xsql = "select distinct(link_key) "
xsql = xsql & " from s_elib_doclink where inuse ='T' and (link_type = 'UNIT' or link_type is null) "
xsql = xsql & " order by link_key "
Set rx = Server.CreateObject("ADODB.Recordset")
rx_SQL = xsql
rx.Open rx_SQL, strCon,1,3
If rx.RecordCount <> 0 Then
rx.MoveFirst
Do While Not rx.EOF
%>
<option><%=rx("link_key")%></option>
<%
rx.Movenext
Loop
rx.close
End if
%>

</select>
</font></td>
</tr>
<tr>
<td height="29"><strong><font size="2">Creator</font></strong></td>
<td><select style='width=130px' id=Creator name=Creator >
<option><%=xCreator%></option>
<%
xsql = "select distinct(creator) "
xsql = xsql & " from s_elib_docmast "
xsql = xsql & " order by creator "
Set rx = Server.CreateObject("ADODB.Recordset")
rx_SQL = xsql
rx.Open rx_SQL, strCon,1,3
If rx.RecordCount <> 0 Then
rx.MoveFirst
Do While Not rx.EOF
%>
<option><%=rx("creator")%></option>
<%
rx.Movenext
Loop
rx.close
End if
%>

</select></td>
<td colspan="2"><select style='width=120px' id=select18 name=Vendor >
<option><%=xVendor%></option>
<%
xsql = "select distinct(vendor) "
xsql = xsql & " from s_elib_docmast "
xsql = xsql & " order by vendor "
Set rx = Server.CreateObject("ADODB.Recordset")
rx_SQL = xsql
rx.Open rx_SQL, strCon,1,3
If rx.RecordCount <> 0 Then
rx.MoveFirst
Do While Not rx.EOF
%>
<option><%=rx("vendor")%></option>
<%
rx.Movenext
Loop
rx.close
End if
%>
</select> <font size="2">&nbsp;</font><font size="2">&nbsp;</font></td>
<td><font size="2">&nbsp;<strong>Tag type</strong></font></td>
<td colspan="2"><font size="2">
<select style='width=180px' id=select36 name=Tagtype>
<option><%=xTagtype%></option>
<%
xsql = "select distinct(link_key) "
xsql = xsql & " from s_elib_doclink where inuse ='T' and (link_type = 'TAG_TYPE' or link_type is null)"
xsql = xsql & " order by link_key "
Set rx = Server.CreateObject("ADODB.Recordset")
rx_SQL = xsql
rx.Open rx_SQL, strCon,1,3

If rx.RecordCount <> 0 Then

Do While Not rx.EOF
%>
<option><%=rx("link_key")%></option>
<%
rx.Movenext
Loop
rx.close
End if
%>
</select>
</font></td>
</tr>
<tr>
<td><strong><font size="2">Document Number</font></strong></td>
<td colspan="3"><select name=doc_number id=select35 style='width=316px' >
<option><%=xDoc_number%></option>
<%
xsql = "select distinct(doc_number) "
xsql = xsql & " from s_elib_docmast "
xsql = xsql & " order by doc_number "
Set rx = Server.CreateObject("ADODB.Recordset")
rx_SQL = xsql
rx.Open rx_SQL, strCon,1,3
If rx.RecordCount <> 0 Then
rx.MoveFirst
Do While Not rx.EOF
%>
<option><%=rx("doc_number")%></option>
<%
rx.Movenext
Loop
rx.close
End if
%>

</select> <font size="2">&nbsp;</font><font size="2">&nbsp;</font></td>
<td><font size="2">&nbsp;<strong>Tag</strong></font></td>
<td colspan="2"><font size="2">
<select style='width=180px' id=select36 name=Tag>
<option><%=xTag%></option>
<%
xsql = "select distinct(link_key) "
xsql = xsql & " from s_elib_doclink where inuse ='T' and (link_type = 'TAG' or link_type is null) "
xsql = xsql & " order by link_key "
Set rx = Server.CreateObject("ADODB.Recordset")
rx_SQL = xsql
rx.Open rx_SQL, strCon,1,3
If rx.RecordCount <> 0 Then
rx.MoveFirst
Do While Not rx.EOF
%>
<option><%=rx("link_key")%></option>
<%
rx.Movenext
Loop
rx.close
End if
%>
</select>
</font></td>
</tr>
<tr>
<td><strong><font size="2">Title</font></strong></td>
<td colspan="3"><select name=Title id=Title style='width=482px'>
<option><%=xTitle%></option>
<%
xsql = "select distinct(title) "
xsql = xsql & " from s_elib_docmast "
xsql = xsql & " order by title "
Set rx = Server.CreateObject("ADODB.Recordset")
rx_SQL = xsql
rx.Open rx_SQL, strCon,1,3
If rx.RecordCount <> 0 Then
rx.MoveFirst
Do While Not rx.EOF
%>
<option><%=rx("title")%></option>
<%
rx.Movenext
Loop
rx.close
End if
%>

</select> <font size="2">&nbsp;</font><font size="2">&nbsp;</font></td>
<td><font size="2">&nbsp;<strong>Manufacturer</strong></font></td>
<td colspan="2"><font size="2">
<select style='width=180px' id=select30 name=Manuf>
<option><%=xManuf%></option>
<%
xsql = "select distinct(link_key) "
xsql = xsql & " from s_elib_doclink where inuse ='T' and (link_type = 'MANUF' or link_type is null)"
xsql = xsql & " order by link_key "
Set rx = Server.CreateObject("ADODB.Recordset")
rx_SQL = xsql
rx.Open rx_SQL, strCon,1,3
If rx.RecordCount <> 0 Then

Do While Not rx.EOF
%>
<option><%=rx("link_key")%></option>
<%
rx.Movenext
Loop
rx.close
End if
%>
</select>
</font></td>
</tr>
<tr>
<td><strong><font size="2">Date : from : to</font></strong></td>
<td colspan="3"> <input name id="Date1"="Date1" type="text" size="10" maxlength="10">
<a href="JavaScript:;" onClick="toggleCalendar('Date1')" > <img border="0" src="formcal.gif" width="16" height="16"></a>
<input id="Date2" name="Date2" type="text" size="10" maxlength="10">
<a href="JavaScript:;" onClick="toggleCalendar('Date2')"><img border="0" src="formcal.gif" width="16" height="16"></a>
<TABLE bgColor=#ffffff border=1 cellPadding=0 cellSpacing=3 id=calendar style="DISPLAY: none; POSITION: absolute; Z-INDEX: 4">
<TBODY>
<TR>
<TD colSpan=7 vAlign=center>
<!-- Month combo box -->
<SELECT id=month onchange=newCalendar()>
<SCRIPT language=JavaScript>
// Output months into the document.
// Select current month.
for (var intLoop = 0; intLoop < months.length; intLoop++)
document.write("<OPTION " + (today.month == intLoop ? "Selected" : "") + ">" + months[intLoop]);
</SCRIPT>
</SELECT>
<!-- Year combo box -->
<SELECT id=year onchange=newCalendar()>
<SCRIPT language=JavaScript>
// Output years into the document.
// Select current year.
for (var intLoop = 1900; intLoop < 2028; intLoop++)
document.write("<OPTION " + (today.year == intLoop ? "Selected" : "") + ">" + intLoop);
</SCRIPT>
</SELECT>

</TD>
</TR>



<TR class=days>
<!-- Generate column for each day. -->
<SCRIPT language=JavaScript>
// Output days.
for (var intLoop = 0; intLoop < days.length; intLoop++)
document.write("<TD>" + days[intLoop] + "</TD>");
</SCRIPT>
</TR>


<TBODY class=dates id=dayList onclick="getDate('')" vAlign=center>
<!-- Generate grid for individual days. -->
<SCRIPT language=JavaScript>
for (var intWeeks = 0; intWeeks < 6; intWeeks++)
{
document.write("<TR>");
for (var intDays = 0; intDays < days.length; intDays++)
document.write("<TD></TD>");
document.write("</TR>");
}
</SCRIPT>

<!-- Generate today day. --></TBODY>
<TBODY>
<TR>
<TD class=today colSpan=5 id=todayday onclick=getTodayDay()></TD>
<TD align=right colSpan=2><A href="javascript:HideCalendar();"><SPAN style="COLOR: black; FONT-SIZE: 10px"><B>Hide</B></SPAN></A></TD>
</TR>
</TBODY>

</TABLE>

<font size="2">&nbsp;</font><font size="2">&nbsp;
<input type="hidden" name="Act" value="A">
</font></td>
<td><font size="2">&nbsp;<strong>Model</strong></font></td>
<td colspan="2"><font size="2">
<select style='width=180px' id=select31 name=model >
<option><%=xModel%></option>
<%
xsql = "select distinct(link_key) "
xsql = xsql & " from s_elib_doclink where inuse ='T' and (link_type = 'MODEL' or link_type is null) "
xsql = xsql & " order by link_key "
Set rx = Server.CreateObject("ADODB.Recordset")
rx_SQL = xsql
rx.Open rx_SQL, strCon,1,3
If rx.RecordCount <> 0 Then

Do While Not rx.EOF
%>
<option><%=rx("link_key")%></option>
<%
rx.Movenext
Loop
rx.close
End if
%>
</select>
</font></td>
</tr>
</table>
</hr>
<table width="100%" border="0">
<tr>
<td height="26"><div align="center"> </div>
<strong></strong></td>
<td width="66%"><font size="2">&nbsp;
<input name="search" type="submit" value="Search"align="right" style= 'width=70px'>
<input name="Clear" type="reset" value="Clear"align="right" style= 'width=70px' onsubmit="this.form.reset();">
<input name="Exit" type="button" value="Exit"align="right" style= 'width=70px' onClick="JavaScript:window.close();">
</font></td>

</tr>
<br>
<tr>
<td colspan="2"><p>
<br>

</td>
</tr>
</table>
</form>
<iframe name="Result" src="result.asp?x0=<%=xAct %>&x1=<%=xDoctype %>&x2=<%=xSubtype %>&x3=<%=xSubsubtype %>&x4=<%=xProject %>&x5=<%=xCreator %>&x6=<%=xVendor %>&x7=<%=xDocnumber %>&x8=<%=xTitle %>&x9=<%=xArea%>&x10=<%=xUnit%>&x11=<%=xTagType%>&x12=<%=xTag%>&x13=<%=xManuf%>&x14=<%=xModel%>&x15=<%=xDate1%>&x16=<%=xDate2%>"scrolling="yes" width="940" height="205" ></iframe>
</p>
</hr>
</body>
</html>
Date : 2009-11-13 10:46:25 By : poyz-say-hi
 

   

ค้นหาข้อมูล


   
 

แสดงความคิดเห็น
Re : clear form หลังจากที่ submit แล้วทำยังไงค่ะ รบกวนขอคำแนะนำเกี่ยวกับเรื่องนี้หน่อยค่ะ ต้องการเคลียร์ค่าใน list menu หลังจากที่ได้ submit
 
 
รายละเอียด
 
ตัวหนา ตัวเอียง ตัวขีดเส้นใต้ ตัวมีขีดกลาง| ตัวเรืองแสง ตัวมีเงา ตัวอักษรวิ่ง| จัดย่อหน้าอิสระ จัดย่อหน้าชิดซ้าย จัดย่อหน้ากึ่งกลาง จัดย่อหน้าชิดขวา| เส้นขวาง| ขนาดตัวอักษร แบบตัวอักษร
ใส่แฟลช ใส่รูป ใส่ไฮเปอร์ลิ้งค์ ใส่อีเมล์ ใส่ลิ้งค์ FTP| ใส่แถวของตาราง ใส่คอลัมน์ตาราง| ตัวยก ตัวห้อย ตัวพิมพ์ดีด| ใส่โค้ด ใส่การอ้างถึงคำพูด| ใส่ลีสต์
smiley for :lol: smiley for :ken: smiley for :D smiley for :) smiley for ;) smiley for :eek: smiley for :geek: smiley for :roll: smiley for :erm: smiley for :cool: smiley for :blank: smiley for :idea: smiley for :ehh: smiley for :aargh: smiley for :evil:
Insert PHP Code
Insert ASP Code
Insert VB.NET Code Insert C#.NET Code Insert JavaScript Code Insert C#.NET Code
Insert Java Code
Insert Android Code
Insert Objective-C Code
Insert XML Code
Insert SQL Code
Insert Code
เพื่อความเรียบร้อยของข้อความ ควรจัดรูปแบบให้พอดีกับขนาดของหน้าจอ เพื่อง่ายต่อการอ่านและสบายตา และตรวจสอบภาษาไทยให้ถูกต้อง

อัพโหลดแทรกรูปภาพ

Notice

เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ
อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง

   
  เพื่อความปลอดภัยและการตรวจสอบ กระทู้ที่แทรกไฟล์อัพโหลดไฟล์จากที่อื่น อาจจะถูกลบทิ้ง
 
โดย
อีเมล์
บวกค่าให้ถูก
<= ตัวเลขฮินดูอารบิก เช่น 123 (หรือล็อกอินเข้าระบบสมาชิกเพื่อไม่ต้องกรอก)







Exchange: นำเข้าสินค้าจากจีน, Taobao, เฟอร์นิเจอร์, ของพรีเมี่ยม, ร่ม, ปากกา, power bank, แฟลชไดร์ฟ, กระบอกน้ำ

Load balance : Server 03
ThaiCreate.Com Logo
© www.ThaiCreate.Com. 2003-2024 All Rights Reserved.
ไทยครีเอทบริการ จัดทำดูแลแก้ไข Web Application ทุกรูปแบบ (PHP, .Net Application, VB.Net, C#)
[Conditions Privacy Statement] ติดต่อโฆษณา 081-987-6107 อัตราราคา คลิกที่นี่