473,770 Members | 2,135 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Not getting date value

vikas251074
198 New Member
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.


Expand|Select|Wrap|Line Numbers
  1. <%@ Language=VBScript%>
  2. <%Option Explicit%>
  3. <html>
  4. <head>
  5. <title>SABF</title>
  6. <!--#include file="font.css"-->
  7. <!--#include file="func.inc"-->
  8. </head>
  9. <body>
  10. <!--#include file="head.inc"-->
  11. <%
  12. Dim R
  13. Dim R1 
  14. Dim vempno, vempname, vdesign, vgrade, vOffstaff, vdob, vdoj, vdos, vndos, vdoa, vdojgr, vreason, voption, vcommutation
  15. Dim vrehabilitation, vBasic2003, vstag2003, vpersonalpay2003, vsplpay2003, vadhoc2003, vnpa2003, vda2003, vprotectedpay2003
  16. Dim vbasic, vstag, vpersonalpay, vsplpay, vadhoc, vnpa, vda, vprotectedpay,vbeneficiaryspouse, vdobos, valtnominee1,
  17. Dim valtnominee2, valtnominee3, valtnominee4, valtnominee5, valtnominee6, vaddress, vcontact, vassesseno, vtotal, v1third
  18. Dim vrefund, vmonthlypension, vchoiceopt
  19. Dim errorMsg
  20. Dim conn
  21. Dim i
  22. Dim vdobyyyy, vdobmm, vdobdd
  23. Dim vdojyyyy, vdojmm, vdojdd
  24. Dim vdosyyyy, vdosmm, vdosdd
  25. Dim vndosyyyy, vndosmm, vndosdd
  26. Dim vdoayyyy, vdoamm, vdoadd
  27. Dim vdojgryyyy, vdojgrmm, vdojgrdd
  28. Dim vdobosyyyy, vdobosmm, vdobosdd
  29. Dim no_of_day
  30.   If Not IsEmpty(Request.Form("submit")) then
  31.     vempno = Request.Form("vempno")
  32.     vempname = Request.Form("vempname")
  33.     vdesign = Request.Form("vdesign")
  34.     vgrade = Request.Form("vgrade")
  35.     vdobyyyy = Request.Form("vdobyyyy")
  36.     vdobmm = Request.Form("vdobmm")
  37.     vdobdd = Request.Form("vdobdd")
  38.     vdojyyyy = Request.Form("vdojyyyy")
  39.     vdojmm = Request.Form("vdojmm")
  40.     vdojdd = Request.Form("vdojdd")
  41.     vaddress = trim(vaddress)
  42.     vassesseno = trim(vassesseno)
  43.     vcontact = trim(vcontact)
  44.     vchoiceopt = trim(vchoiceopt)
  45. %>
  46.   <div style="Position:Absolute; top:120; left:50; background-color: #f0f0f0">
  47.     <h2>SABF Entry</h3>
  48.     <hr>
  49.     <p>
  50.     <form method="POST" action="sabf.asp">
  51. <%
  52.       If len(errorMsg) > 0 Then
  53.         Response.Write "<p><font color='red'>" & errorMsg & "</font></p>"
  54.       End If
  55. %>
  56.       <table width=900>
  57.         <tr>
  58.           <table align="center">
  59.             <tr>
  60.               <td align="center"><font face="arial"><h3>SABF Entry</h3></font></h3>
  61.             </tr>
  62.             <tr>
  63.               <td align="center"><font face="arial" size=4>Creation</font></h3>
  64.             </tr>
  65.           </table>
  66.         </tr>
  67.         <tr>
  68.           <table align="center">
  69.             <tr>
  70.               <td align="right"><font face="arial" size=2>Employee No : </font></td>
  71.               <td align='left'><input type="text" style="width:100px" name="vempno"></td>
  72.               <td align="right"><font face="arial" size=2>Employee Name : </font></td>
  73.               <td align='left'><input type="text" style="width:300px" name="vempname"></td>
  74.             </tr>
  75.             <tr>
  76.               <td align="right"><font face="arial" size=2>Designation : </font></td>
  77.               <td align='left'><input type="text" style="width:300px" name="vdesig"></td>
  78.               <td align="right"><font face="arial" size=2>Grade : </font></td>
  79.               <td align='left'><input type="text" style="width:300px" name="vgrade"></td>
  80.             </tr>
  81.             <tr>
  82.               <td align="right"><font face="arial" size=2>Category : </font></td>
  83.               <td align="left">
  84.                  <font face="arial" size=2><select name="voffstaff">
  85.                        <option value="Officer">Officer</option>
  86.                        <option value"staff" selected>Staff</option></select>
  87.                  </font>
  88.               </td>
  89.               <td align="right"><font face="arial" size=2>Date of Birth : </font></td>
  90.               <td>
  91.                 <select name="vdobyyyy">
  92.                   <%i=1965
  93.                   do while i <= year(date)
  94.                     If i = Cint(vdobyyyy) Then%>
  95.                       <option value="<%=vdobyyyy%>" selected><%=vdobyyyy%></option>
  96.                     <%Else
  97.                       If i = 2007 then
  98.                         If IsEmpty(vdobyyyy) Then%>
  99.                           <option value="<%=i%>" selected><%=i%></option>
  100.                         <%End If
  101.                       else%>
  102.                         <option value="<%=i%>"><%=i%></option>
  103.                       <%end If
  104.                     End If
  105.                     i = i + 1
  106.                   loop%>
  107.                 </select>
  108.                 <select name="vdobmm">
  109.                   <%i=1
  110.                   Do while i <= 12
  111.                     If i = Cint(vdobmm) then%>
  112.                       <option value="<%=vdobmm%>" selected><%=vdobmm%></option>
  113.                     <%Else%>
  114.                       <option value="<%=i%>"><%=i%></option>
  115.                     <%End If
  116.                     i = i + 1
  117.                   loop%>
  118.                 </select>
  119.                 <select name="vdobdd">
  120.                   <%If vdobyyyy mod 4 = 0 And vdobmm = 2 Then
  121.                     no_of_day = 29
  122.                   ElseIf vdobyyyy mod 4 <> 0 and vdobmm = 2 Then
  123.                     no_of_day = 28
  124.                   ElseIf vdobmm=4 or vdobmm=6 or vdobmm=9 or vdobmm=11 Then
  125.                     no_of_day = 30
  126.                   Else
  127.                     no_of_day = 31
  128.                   End If
  129.                   i=1
  130.                   Do while i <= no_of_day
  131.                     If i = Cint(vdobdd) Then%>
  132.                       <option value="<%=vdobdd%>" selected><%=vdobdd%></option>
  133.                     <%Else%>
  134.                       <option value="<%=i%>"><%=i%></option>
  135.                     <%End If
  136.                     i = i + 1
  137.                   loop%>
  138.                 </select><font color='blue' size=2>(yyyy-mm-dd)</font>
  139.               </td>
  140.             </tr>
  141.           </table>
  142.         </tr>
  143.         <tr>
  144.           <table align="center">
  145.             <tr>
  146.               <td align="center"><input type="Submit" name="submit" value="Save">
  147.                                  <input type="reset" name="reset" value="Reset">
  148.               </td>
  149.             </tr>
  150.           </table>
  151.         </tr>
  152.       </table>
  153.     </form>
  154.     </p>
  155.   </div>
  156. <%
  157. End If
  158. %>
  159. <!--#include file="menu.inc"-->
  160. </body>
  161. </html>
  162.  
Sep 5 '09 #1
9 3542
vikas251074
198 New Member
problem may lies in line no. 91 - 138. Please suggest me where should be mistake
Sep 7 '09 #2
jhardman
3,406 Recognized Expert Specialist
I don't understand, what is not working? everything in the code looks like it should work, if you said what result you got it might help to clarify the problem.

Jared
Sep 8 '09 #3
vikas251074
198 New Member
list of year, list of months and list of days is not displaying .

The date field is completely blank.
Sep 15 '09 #4
jhardman
3,406 Recognized Expert Specialist
OK then, navigate to the page and post the code you get from "view source"

Jared
Sep 16 '09 #5
vikas251074
198 New Member
code is already given in the first part. You can see in this thread
Sep 19 '09 #6
vikas251074
198 New Member
The problem is that list of year, list of months and list of days is not displaying in date field.
Sep 19 '09 #7
jhardman
3,406 Recognized Expert Specialist
@vikas251074
No, I am not talking about the ASP code. I am talking about the HTML code that you see AFTER the server parses the script. AFTER you navigate to the page FROM YOUR BROWSER you can see the source code (in Firefox go view -> Page Source). This will show a listing of the code that the server sent to the browser. This is the code I asked you to post. The code you posted in the first post is the raw ASP code, the code the server interprets. This should not be the code that is sent to the browser. Does this make sense?

Jared
Sep 29 '09 #8
gcube
17 New Member
I realize it's been a while since the last post on this, but I think I found the problem. There is a conditional section between lines 30 and 157 that only executes when the page has been called after a form on a previous page has been submitted. If you just open this page, then the form submittal has not been made and everything between lines 30 and 157 will not be displayed.
Oct 20 '09 #9
vikas251074
198 New Member
I am glad to inform you that this problem has been rectified.

All this problem was due to IIS configuration setting that does not allow to run ASP.

Now it has been rectified. Previously not a single asp programme was running. And I was got confused at the time. Now this has been rectified.

Thanx for ansering sir,

Regards,
Vikas
Oct 21 '09 #10

Sign in to post your reply or Sign up for a free account.

Similar topics

11
12484
by: David Messner | last post by:
Ok I know this is simple but the statement eludes me... I have a date field where I want the default value on the data entry form's date field to be the last date entered. I figure I can do this with a query but don't know what the criteria needs to be. Any help would be appreciated, Thanks
9
2045
by: deko | last post by:
What is it with these dates? What are they so much trouble? All I want to do is subtract an hour, but not if that makes dtmTest less than dtmClt. Dim dtmStart As Date Dim dtmEnd As Date Dim dtmCtl As Date Dim dtmTest As Date Me!cbxEndTime.Requery Me!cbxStartTime.Requery
2
8089
by: Martin Raychev | last post by:
Hi all, I have the following problem: I have a private method that returns a SqlDataReader. For this to work I have not to close the DB connection in the above method. I do this only to
5
5991
by: Nathan Sokalski | last post by:
I have a user control that contains three variables which are accessed through public properties. They are declared immediately below the "Web Form Designer Generated Code" section. Every time an event is fired by one of the controls contained in the User Control, these variable are reset. Here is my current code (I have a little more to add later, right now I am just concerned about the variables getting reset): Public Class DatePicker2...
0
1248
by: salo | last post by:
Hi ........Im working with c# and asp.net and i have two calendar control in my form and i want the cliked date value to be get displayed in the textbox. i gave the code as TextBox1.Text = Calendar1.SelectedDates.ToString(); in page load event but while running nothing is displayed. and also after getting the date in the textbox ...i have to subtract the from date and to date plz can anybody help me....
1
3199
by: simbarashe | last post by:
Hie could someone please help me with getting and using the current page url. I have a function that gets the url, I want to use it with header(location : XXX) but it wont work. The code is as follows: The code below is for the first page:session_start is in line 3 <link href="css/jobSheet.css" rel="stylesheet" type="text/css" /> session_start();
8
1994
by: chimambo | last post by:
Hi Everyone, I have a huge problem. I am trying to get two corresponding variables from a Checkbox and a Text box. e.g. If I check a value, say: enrolled? (checkbox) then I have to put the date enrolled as a text. So when inserting in a table I want the enrolled to correspond to each date. Here is what I am trying but not working (In the echos is where I am trying to have the values into the table): while (list($key, $val) = @each...
9
2629
Catalyst159
by: Catalyst159 | last post by:
I have a form which is used to calculate residential Floor Area Ratio (FAR). The form is structured into seven parts as follows: Part A: Maximum FAR and Floor Area: Part B: Gross Floor Area of the main floors of the main house: Part C: Gross Floor Area of the basement or cellar: Part D: Gross Floor Area of the attic:
7
4445
vikas251074
by: vikas251074 | last post by:
I am getting error above in following code since few days giving tension day and night. How can I solve this? I am facing since Oct.25. in line no. 362 After doing a lot of homework, I am surrendered to you. <%@ Language=VBScript%> <%Option Explicit%>
0
9591
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9425
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10228
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10057
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9869
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5312
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5449
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3970
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2816
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.