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. -
<%@ 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>
-
9 3542
problem may lies in line no. 91 - 138. Please suggest me where should be mistake
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
list of year, list of months and list of days is not displaying .
The date field is completely blank.
jhardman 3,406
Recognized Expert Specialist
OK then, navigate to the page and post the code you get from "view source"
Jared
code is already given in the first part. You can see in this thread
The problem is that list of year, list of months and list of days is not displaying in date field.
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
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.
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
Sign in to post your reply or Sign up for a free account.
Similar topics |
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
|
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
|
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
|
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...
|
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....
| |
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();
|
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...
|
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:
|
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%>
|
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...
|
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,...
| |
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...
|
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...
|
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...
|
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...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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
| |
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...
| |