I am not getting date value in spite of my good effort. This code was working in my last office where I work. Now I am trying to work at my home pc. but not getting date value. Any can help me why this happens. This is my part of code given below.
Code:
<%@ Language=VBScript%> <%Option Explicit%> <html> <head> <title>SABF</title> <!--#include file="font.css"--> <!--#include file="func.inc"--> </head> <body> <!--#include file="head.inc"--> <% Dim R Dim R1 Dim vempno, vempname, vdesign, vgrade, vOffstaff, vdob, vdoj, vdos, vndos, vdoa, vdojgr, vreason, voption, vcommutation Dim vrehabilitation, vBasic2003, vstag2003, vpersonalpay2003, vsplpay2003, vadhoc2003, vnpa2003, vda2003, vprotectedpay2003 Dim vbasic, vstag, vpersonalpay, vsplpay, vadhoc, vnpa, vda, vprotectedpay,vbeneficiaryspouse, vdobos, valtnominee1, Dim valtnominee2, valtnominee3, valtnominee4, valtnominee5, valtnominee6, vaddress, vcontact, vassesseno, vtotal, v1third Dim vrefund, vmonthlypension, vchoiceopt Dim errorMsg Dim conn Dim i Dim vdobyyyy, vdobmm, vdobdd Dim vdojyyyy, vdojmm, vdojdd Dim vdosyyyy, vdosmm, vdosdd Dim vndosyyyy, vndosmm, vndosdd Dim vdoayyyy, vdoamm, vdoadd Dim vdojgryyyy, vdojgrmm, vdojgrdd Dim vdobosyyyy, vdobosmm, vdobosdd Dim no_of_day If Not IsEmpty(Request.Form("submit")) then vempno = Request.Form("vempno") vempname = Request.Form("vempname") vdesign = Request.Form("vdesign") vgrade = Request.Form("vgrade") vdobyyyy = Request.Form("vdobyyyy") vdobmm = Request.Form("vdobmm") vdobdd = Request.Form("vdobdd") vdojyyyy = Request.Form("vdojyyyy") vdojmm = Request.Form("vdojmm") vdojdd = Request.Form("vdojdd") vaddress = trim(vaddress) vassesseno = trim(vassesseno) vcontact = trim(vcontact) vchoiceopt = trim(vchoiceopt) %> <div style="Position:Absolute; top:120; left:50; background-color: #f0f0f0"> <h2>SABF Entry</h3> <hr> <p> <form method="POST" action="sabf.asp"> <% If len(errorMsg) > 0 Then Response.Write "<p><font color='red'>" & errorMsg & "</font></p>" End If %> <table width=900> <tr> <table align="center"> <tr> <td align="center"><font face="arial"><h3>SABF Entry</h3></font></h3> </tr> <tr> <td align="center"><font face="arial" size=4>Creation</font></h3> </tr> </table> </tr> <tr> <table align="center"> <tr> <td align="right"><font face="arial" size=2>Employee No : </font></td> <td align='left'><input type="text" style="width:100px" name="vempno"></td> <td align="right"><font face="arial" size=2>Employee Name : </font></td> <td align='left'><input type="text" style="width:300px" name="vempname"></td> </tr> <tr> <td align="right"><font face="arial" size=2>Designation : </font></td> <td align='left'><input type="text" style="width:300px" name="vdesig"></td> <td align="right"><font face="arial" size=2>Grade : </font></td> <td align='left'><input type="text" style="width:300px" name="vgrade"></td> </tr> <tr> <td align="right"><font face="arial" size=2>Category : </font></td> <td align="left"> <font face="arial" size=2><select name="voffstaff"> <option value="Officer">Officer</option> <option value"staff" selected>Staff</option></select> </font> </td> <td align="right"><font face="arial" size=2>Date of Birth : </font></td> <td> <select name="vdobyyyy"> <%i=1965 do while i <= year(date) If i = Cint(vdobyyyy) Then%> <option value="<%=vdobyyyy%>" selected><%=vdobyyyy%></option> <%Else If i = 2007 then If IsEmpty(vdobyyyy) Then%> <option value="<%=i%>" selected><%=i%></option> <%End If else%> <option value="<%=i%>"><%=i%></option> <%end If End If i = i + 1 loop%> </select> <select name="vdobmm"> <%i=1 Do while i <= 12 If i = Cint(vdobmm) then%> <option value="<%=vdobmm%>" selected><%=vdobmm%></option> <%Else%> <option value="<%=i%>"><%=i%></option> <%End If i = i + 1 loop%> </select> <select name="vdobdd"> <%If vdobyyyy mod 4 = 0 And vdobmm = 2 Then no_of_day = 29 ElseIf vdobyyyy mod 4 <> 0 and vdobmm = 2 Then no_of_day = 28 ElseIf vdobmm=4 or vdobmm=6 or vdobmm=9 or vdobmm=11 Then no_of_day = 30 Else no_of_day = 31 End If i=1 Do while i <= no_of_day If i = Cint(vdobdd) Then%> <option value="<%=vdobdd%>" selected><%=vdobdd%></option> <%Else%> <option value="<%=i%>"><%=i%></option> <%End If i = i + 1 loop%> </select><font color='blue' size=2>(yyyy-mm-dd)</font> </td> </tr> </table> </tr> <tr> <table align="center"> <tr> <td align="center"><input type="Submit" name="submit" value="Save"> <input type="reset" name="reset" value="Reset"> </td> </tr> </table> </tr> </table> </form> </p> </div> <% End If %> <!--#include file="menu.inc"--> </body> </html>
Comment