Error Type: Object required: 'uploaddata' รบกวนทุกท่านด้วยครับ
<%@ language = vbscript%>
<!-- #include file="../helpdesk_system/conn.asp" -->
<%
sql = "Select * from EMPMONTH ; "
set rs = Conn_helpdesk.execute(sql)
sql1 = "Select * from Helpdesk_Job_type"
set rsjobtype = Conn_helpdesk.execute(sql1)
sql2 = "select * from Helpdesk_Service_order"
set rs_serviceorder = Conn_helpdesk.execute(sql2)
set rs_serviceorder = Server.CreateObject("adodb.recordset")
rs_serviceorder.Open sql2,Conn_helpdesk,1,3
'-----------****************************************************************-------------------
if rs_serviceorder.RecordCount =0 then
' *********************************************************************************
selectJob_Id = Request("selectJob_Id")
' ** selectdateIn = Request("selectdateIn")
textfieldJob_header = Request("textfieldJob_header")
textfieldJob_detail = Request("textfieldJob_detail")
textfieldCreate_by = Request("textfieldCreate_by")
textfieldCreate_where = Request("textfieldCreate_where")
textfield_IP = Request("textfield_IP")
SelectNAME_IT_Acknowladge = Request("SelectNAME_IT_Acknowladge")
SelectNAMEEMP_IT_Responsible = Request("SelectNAMEEMP_IT_Responsible")
' ** selectdate = Request("selectdate")
' *********************************************************************************
rs_serviceorder.AddNew
rs_serviceorder("Service_Id")=uploaddata.Item("textfieldService_id").Item("value")
rs_serviceorder("Job_Id") = selectJob_Id
rs_serviceorder("Job_header") = textfieldJob_header
rs_serviceorder("Job_detail") = textfieldJob_detail
rs_serviceorder("Create_by") = textfieldCreate_by
rs_serviceorder("Create_where") = textfieldCreate_where
rs_serviceorder("COM_IP") = textfield_IP
rs_serviceorder("Acknowladge") = SelectNAME_IT_Acknowladge
rs_serviceorder("Responsible") = SelectNAMEEMP_IT_Responsible
'rs_serviceorder.Save
' rs_serviceorder.movenext
'rs_serviceorder.close
'*******************************************************************************
else
textfieldService_id = Request("textfieldService_id")
selectJob_Id = Request("selectJob_Id")
' ** selectdateIn = Request("selectdateIn")
textfieldJob_header = Request("textfieldJob_header")
textfieldJob_detail = Request("textfieldJob_detail")
textfieldCreate_by = Request("textfieldCreate_by")
textfieldCreate_where = Request("textfieldCreate_where")
textfield_IP = Request("textfield_IP")
SelectNAME_IT_Acknowladge = Request("SelectNAME_IT_Acknowladge")
SelectNAMEEMP_IT_Responsible = Request("SelectNAMEEMP_IT_Responsible")
' ** selectdate = Request("selectdate")
' *********************************************************************************
rs_serviceorder.MoveLast
'rs_serviceorder.AddNew
'************************ rs_serviceorder("Service_Id")=uploaddata.Item("textfieldService_id").Item("value")
rs_serviceorder("Service_Id")=uploaddata.Item("textfieldService_id").Item("value")
' rs_serviceorder("Service_Id") = textfieldService_id
rs_serviceorder("Job_Id") = selectJob_Id
rs_serviceorder("Job_header") = textfieldJob_header
rs_serviceorder("Job_detail") = textfieldJob_detail
rs_serviceorder("Create_by") = textfieldCreate_by
rs_serviceorder("Create_where") = textfieldCreate_where
rs_serviceorder("Acknowladge") = SelectNAME_IT_Acknowladge
rs_serviceorder("Responsible") = SelectNAMEEMP_IT_Responsible
'rs_serviceorder.Save
'rs_serviceorder.close
'******************************************************************************
end if
rs_serviceorder.Save
rs_serviceorder.close
' **** rs_serviceorder("") =
' **** rs_serviceorder("") =
' *********************************************************************************
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-874">
<title>Helpdesk</title>
<link href="style/style.css" rel="stylesheet" type="text/css">
</head>
<body>
<FORM name = "userinfo" action="Index.asp" method="post" onsubmit="">
<!-- <p>
<% Response.write("Hello Asp") %>
</p> -->
<p>
<label>àÅ¢·Õè</label><!--comment>àÅ¢·Õè<!--comment-->
<input name="textfieldService_id" type="text" size="10" maxlength="10" > <!-- disabled="disabled" ãËéਹàÍÒ-->
</p>
<p>
<label>ÅѡɳЧҹ·Õè«èÍÁ</label><!--comment>ÅѡɳЧҹ·Õè«èÍÁ<!--comment-->
<!-- <select name="selectJob_Id">
<option value="1">§Ò¹ªèÒ§ (ºÓÃاÃÑ¡ÉÒ , «èÍÁ)</option>
<option value="2">§Ò¹ºÃÔ¡ÒÃ</option>
<option value="3">§Ò¹â»Ãá¡ÃÁàÁÍÃì (á¡éä¢ , ÊÃéÒ§ â»Ãá¡ÃÁ)</option>
<option value="4">§Ò¹Í×è¹æ (ͺÃÁ)</option>
</select>
-->
<select name="selectJob_Id" >
<option value="" selected >--â»Ã´àÅ×Í¡ ÅѡɳЧҹ--</option>
<%
strsql1 = "Select * from Helpdesk_Job_type "
Set rsjobtype = Conn_helpdesk.execute(strsql1)
do until rsjobtype.eof
response.write"<option value ="""&rsjobtype("Job_Id")&""">"&rsjobtype("Type_Detail")&"</option>"
rsjobtype.movenext
loop
%>
</select>
</p>
<p>
<label>Çѹ·ÕèÃѺá¨é§</label> <!--comment>Çѹ·ÕèÃѺá¨é§<!--comment-->
<label>Çѹ·Õè</label>
<select name="selectdateIn"> <!-- àÅ×Í¡Çѹ·Õè -->
<option value="01">1</option>
<option value="02">2</option>
<option value="03">3</option>
<option value="04">4</option>
<option value="05">5</option>
<option value="06">6</option>
<option value="07">7</option>
<option value="08">8</option>
<option value="09">9</option>
<option value="10">10</option>
<option value="11">11</option>
<option value="12">12</option>
<option value="13">13</option>
<option value="14">14</option>
<option value="15">15</option>
<option value="16">16</option>
<option value="17">17</option>
<option value="18">18</option>
<option value="19">19</option>
<option value="20">20</option>
<option value="21">21</option>
<option value="22">22</option>
<option value="23">23</option>
<option value="24">24</option>
<option value="25">25</option>
<option value="26">26</option>
<option value="27">27</option>
<option value="28">28</option>
<option value="29">29</option>
<option value="30">30</option>
<option value="31">31</option>
</select> <!-- àÅ×Í¡Çѹ·Õè -->
<label>à´×͹</label>
<select name="selectmonthIn"><!-- àÅ×Í¡à´×͹ -->
<option value="01">Á¡ÃÒ¤Á Jan</option>
<option value="02">¡ØÁÀҾѹ¸ì Feb</option>
<option value="03">ÁÕ¹Ò¤Á Mar</option>
<option value="04">àÁÉÒ¹ Apr</option>
<option value="05">¾ÄÉÀÒ¤Á May</option>
<option value="06">ÁԶعÒ¹ Jun</option>
<option value="07">¡Ã¡®Ò¤Á Jul</option>
<option value="08">ÊÔ§ËÒ¤Á Aug</option>
<option value="09">¡Ñ¹ÂÒ¹ Sep</option>
<option value="10">µØÅÒ¤Á Oct</option>
<option value="11">¾ÄȨԡÒ¹ Nov</option>
<option value="12">¸Ñ¹ÇÒ¤Á Dec</option>
</select> <!-- àÅ×Í¡à´×͹ -->
<label>»Õ ¾.È.</label>
<select name="selectyearIn"><!-- àÅ×Í¡»Õ -->
<option value="2005">2548</option>
<option value="2006">2549</option>
<option value="2007">2550</option>
<option value="2008">2551</option>
<option value="2009">2552</option>
<option value="2010">2553</option>
<option value="2011">2554</option>
<option value="2012">2552</option>
<option value="2013">2553</option>
<option value="2014">2554</option>
</select> <!-- àÅ×Í¡»Õ -->
</p>
<!-- -------------------------------------------------------------------------------------- -->
<%
Sub ValidateTimeIn
if (request.Form.Item("text_HH_in")>= 0 and request.Form.Item("text_HH_in")<= 23 ) and _
(request.Form.Item("text_MM_in")>= 0 and request.Form.Item("text_MM_in")<= 59)and _
(request.Form.Item("text_SS_in")>= 0 and request.Form.Item("text_SS_in")<= 59) Then
else
Response.Write ("¤Ø³¡ÃÍ¡¢éÍÁÙÅàÇÅÒ¼Ô´")
End if
End Sub
Sub ValidateTimeOut
if (request.Form.Item("text_HH_out")>= 0 and _
request.Form.Item("text_HH_out")<= 23 )and _
(request.Form.Item("text_MM_out")>= 0 and _
request.Form.Item("text_MM_out")<= 59)and _
(request.Form.Item("text_SS_out")>= 0 and _
request.Form.Item("text_SS_out")<= 59) Then
else
Response.Write ("¤Ø³¡ÃÍ¡¢éÍÁÙÅàÇÅÒ¼Ô´")
End if
End Sub
Dim TimeStringIn
if (Request.Form.Item("text_HH_in") = ""OR _
Request.Form.Item("text_MM_in") = ""OR _
Request.Form.Item("text_SS_in") = "" OR _
Request.Form.Item("text_HH_out") = ""OR _
Request.Form.Item("text_MM_out") = ""OR _
Request.Form.Item("text_SS_out") = "" )Then
%>
<!-- <Form Method = Post Name = "DataForm" > -->
<p>
<label> àÇÅÒ HH : MM : SS</label>
<input name = "text_HH_in" type = "text" size = "1" maxlength = "2" >
<label> : </label>
<input name = "text_MM_in" type = "text" size = "1" maxlength = "2" >
<label> : </label>
<input name = "text_SS_in" type = "text" size = "1" maxlength = "2" >
</p>
<!-- </Form> -->
<%ELSE%>
<%
text_HH_in = Request.Form.Item("text_HH_in")
text_MM_in = Request.Form.Item("text_MM_in")
text_SS_in = Request.Form.Item("text_SS_in")
text_HH_out = Request.Form.Item("text_HH_out")
text_MM_out = Request.Form.Item("text_MM_out")
text_SS_out = Request.Form.Item("text_SS_out")
TimeStringIn = text_HH_in & ":" &text_MM_in & ":" &text_SS_in
TimeStringOut = text_HH_out & ":" &text_MM_out & ":" &text_SS_out
IF (not IsNumeric (text_HH_in)) OR _
(not IsNumeric (text_MM_in)) OR _
(not IsNumeric (text_SS_in)) OR _
(not IsNumeric (text_HH_out)) OR _
(not IsNumeric (text_MM_out)) OR _
(not IsNumeric (text_SS_out))Then
Response.Write("<p>¡ÃسҡÃÍ¡¢éÍÁÙÅà»ç¹µÑÇàÅ¢à·èÒ¹Ñé¹</p>")
Else
Call ValidateTimeIn
call ValidateTimeOut
End if
Response.Write(TimeStringIn)
Response.Write("<p>-----------------------------------------------------</p>"&TimeStringout)
End if
%>
<!-- -------------------------------------------------------------------------------------- -->
<p>
<label>ËÑÇ¢éͧ͢»Ñ­ËÒ</label><!--comment>ËÑÇ¢éͧ͢»Ñ­ËÒ<!--comment-->
<input name="textfieldJob_header" type="text" size="50" maxlength="100">
</p>
<p>
<label>ÃÒÂÅÐàÍÕ´¢Í§»Ñ­ËÒ</label><!--comment>ÃÒÂÅÐàÍÕ´¢Í§»Ñ­ËÒ<!--comment-->
<textarea name="textfieldJob_detail" cols="50" rows="3"></textarea>
</p>
<label>¼Ùéá¨é§</label><!--comment>¼Ùéá¨é§<!--comment-->
<input name="textfieldCreate_by" type="text" size="50" maxlength="60">
</p>
<p>
<label>ʶҹ·Õèá¨é§</label><!--comment>ʶҹ·Õèá¨é§<!--comment-->
<input name="textfieldCreate_where" type="text" size="50" maxlength="75">
</p>
<p>
<label>ËÁÒÂàÅ¢ IP </label><!--comment>ËÁÒÂàÅ¢ IP<!--comment-->
<input name="textfield_IP" type="text" size="13" maxlength="15">
<label>¡Ã³Õà»ç¹à¤Ã×èͧ¤ÍÁ¾ÔÇàµÍÃì </label><!--comment>ËÁÒÂàÅ¢ IP ¡Ã³Õà»ç¹à¤Ã×èͧ¤ÍÁ¾ÔÇàµÍÃì<!--comment-->
</p>
<p>
<label>¼ÙéÃѺá¨é§</label> <!--comment>¼ÙéÃѺá¨é§<!--comment-->
<select name="SelectNAME_IT_Acknowladge" ><!-- -->
<option value="" selected >--â»Ã´àÅ×Í¡ ª×è;¹Ñ¡§Ò¹--</option>
<%
strsql = "Select CODE , NAME , DEPT , STATWORK from EMPMONTH where DEPT = 'IT001' and STATWORK = 'A' "
Set rs1 = Conn_helpdesk.execute(strsql)
do until rs1.eof
response.write"<option value ="""&rs1("CODE")&""">"&rs1("NAME")&"</option>"
rs1.movenext
loop
%>
</select>
</p>
<p>
<label>¼ÙéÃѺ¼Ô´ªÍº</label> <!--comment>¼ÙéÃѺ¼Ô´ªÍº<!--comment-->
<select name="SelectNAMEEMP_IT_Responsible" >
<option value="" selected >--â»Ã´àÅ×Í¡ ª×è;¹Ñ¡§Ò¹--</option>
<%
strsql = "Select CODE , NAME , DEPT , STATWORK from EMPMONTH where DEPT = 'IT001' and STATWORK = 'A' "
Set rs1 = Conn_helpdesk.execute(strsql)
do until rs1.eof
response.write"<option value ="""&rs1("CODE")&""">"&rs1("NAME")&"</option>"
rs1.movenext
loop
%>
</select>
</p>
<p>
<label>à»éÒËÁÒ·Õè§Ò¹¨ÐàÊÃç¨</label><!--comment>à»éÒËÁÒ·Õè§Ò¹¨ÐàÊÃç¨ÇѹáÅÐàÇÅÒ<!--comment-->
<label>Çѹ·Õè</label>
<select name="selectdate"> <!-- àÅ×Í¡Çѹ·Õè -->
<option value="01">1</option>
<option value="02">2</option>
<option value="03">3</option>
<option value="04">4</option>
<option value="05">5</option>
<option value="06">6</option>
<option value="07">7</option>
<option value="08">8</option>
<option value="09">9</option>
<option value="10">10</option>
<option value="11">11</option>
<option value="12">12</option>
<option value="13">13</option>
<option value="14">14</option>
<option value="15">15</option>
<option value="16">16</option>
<option value="17">17</option>
<option value="18">18</option>
<option value="19">19</option>
<option value="20">20</option>
<option value="21">21</option>
<option value="22">22</option>
<option value="23">23</option>
<option value="24">24</option>
<option value="25">25</option>
<option value="26">26</option>
<option value="27">27</option>
<option value="28">28</option>
<option value="29">29</option>
<option value="30">30</option>
<option value="31">31</option>
</select> <!-- àÅ×Í¡Çѹ·Õè -->
<label>à´×͹</label>
<select name="selectmonth"><!-- àÅ×Í¡à´×͹ -->
<option value="01">Á¡ÃÒ¤Á Jan</option>
<option value="02">¡ØÁÀҾѹ¸ì Feb</option>
<option value="03">ÁÕ¹Ò¤Á Mar</option>
<option value="04">àÁÉÒ¹ Apr</option>
<option value="05">¾ÄÉÀÒ¤Á May</option>
<option value="06">ÁԶعÒ¹ Jun</option>
<option value="07">¡Ã¡®Ò¤Á Jul</option>
<option value="08">ÊÔ§ËÒ¤Á Aug</option>
<option value="09">¡Ñ¹ÂÒ¹ Sep</option>
<option value="10">µØÅÒ¤Á Oct</option>
<option value="11">¾ÄȨԡÒ¹ Nov</option>
<option value="12">¸Ñ¹ÇÒ¤Á Dec</option>
</select> <!-- àÅ×Í¡à´×͹ -->
<label>»Õ ¾.È.</label>
<select name="selectyear"><!-- àÅ×Í¡»Õ -->
<option value="2005">2548</option>
<option value="2006">2549</option>
<option value="2007">2550</option>
<option value="2008">2551</option>
<option value="2009">2552</option>
<option value="2010">2553</option>
<option value="2011">2554</option>
<option value="2012">2552</option>
<option value="2013">2553</option>
<option value="2014">2554</option>
</select> <!-- àÅ×Í¡»Õ -->
</p>
<p>
<label> àÇÅÒ HH : MM : SS</label>
<input name = "text_HH_out" type = "text" size = "1" maxlength = "2" >
<label> : </label>
<input name = "text_MM_out" type = "text" size = "1" maxlength = "2" >
<label> : </label>
<input name = "text_SS_out" type = "text" size = "1" maxlength = "2" >
</p>
<p>
<!-- < %
rs_serviceorder.Update
' rs_serviceorder.movenext
rs_serviceorder.close
% > -->
<input type=reset name=reset value="Reset" >
<!-- onMouseOver='mOverReset()' onMouseOut='mOutReset()' -->
<input type="submit" name= Submit value="Save" >
<!--onMouseOver='mOverSubmit()' onMouseOut='mOutSubmit()' -->
</p>
</Form>
</body>
</html>Tag : - - - -
Date :
16 ม.ค. 2549 13:49:49
By :
notmis_p
View :
2174
Reply :
3
โอยท่านครับกรุณาบอกบรรทัดหรือว่ารายละเอียดมากกว่านี้หน่อย..แล้วก็ช่วยกรุณาทำให้มันเป็นภาษาไทยหน่อยเถอะ คนที่เค้าจะมาตอบให้ท่านเค้าไม่ได้มีเวลาให้คุณได้มากขนาดที่จะมานั่งแกะโค๊ดให้ท่านหรอกนะ..อีกอย่างตาลายไปหมดแร้ว
Date :
16 ม.ค. 2549 16:29:40
By :
นายกระจอก
นั่นสิ
ไม่ต้องกลัวรู้ source code หรอกครับ
คนอื่นจะได้ดูเป็นตัวอย่างด้วย
อย่างเช่นผม
Date :
16 ม.ค. 2549 18:08:19
By :
bupawan
ไม่ไหวเล่นส่งCodeมาอย่างนี้เทวดาก็ช่วยไม่ได้ครับ...เข้าไปที่บทเรียนแล้วดัดแปลงเอาก็แล้วกัน.
Date :
16 ม.ค. 2549 18:50:40
By :
เป็นงง.
Load balance : Server 03