I am storing value by the following
<td>Name of Person</td>
<td><input type="text" width="100px" name="vname" value=<%=vname%>>
</td>
When I enter 'Vikas Kumar' and press enter key only 'Vikas' value is retained and 'Kumar' is lost.
Why this happens?
17 2219 CroCrew 564
Recognized Expert Contributor
Please post all the code so we can answer why it happens.
And please wrap your code aroung the [code] tags. Look under "Go Advanced" before posting to find it.
Thanks,
CroCrew~
OK sir
I first try in Advance search
CroCrew 564
Recognized Expert Contributor
Hello vikas251074,
Sorry not "Advance Search" but "Go Advanced". See the button to the right of "Post Quick Reply"?
CroCrew 564
Recognized Expert Contributor
Your code above is fine. That is why we need to see all of the code to find out where the problem is.
1) In line no. 142 or any other input box, after entering data of more than one word, after submitting only one word retains remaining data is lost.
2) In line no. 104, I have adding data to table where date value is giving some problem. -
<%@ Language=VBScript%>
-
<%Option Explicit%>
-
<html>
-
<head>
-
<title>Barauni Refinery - Gratuity & Pension Control of Ex-Empoyee</title>
-
<!--#include file="font.css"-->
-
<!--#include file="func.inc"-->
-
<!--#include file="head.inc"-->
-
</head>
-
-
<%
-
Dim R
-
Dim vprmasno, vempno, vempname, vdesign, vsex, vreason, vplace, vprmas_unit, vgrade, vcontribution, vcard_issued
-
Dim vaddress, vcontact, vremarks
-
Dim errorMsg
-
Dim conn
-
Dim i
-
Dim SQL
-
Dim vdosyyyy, vdosmm, vdosdd
-
Dim vdobyyyy, vdobmm, vdobdd
-
Dim vdoeyyyy, vdoemm, vdoedd
-
Dim vmem_fromyyyy, vmem_frommm, vmem_fromdd
-
Dim vmem_uptoyyyy, vmem_uptomm, vmem_uptodd
-
Dim vdodyyyy, vdodmm, vdoddd
-
Dim vdodosyyyy, vdodosmm, vdodosdd
-
Dim no_of_day
-
-
Set conn = Server.Createobject("ADODB.Connection")
-
conn.Open "DSN=ORA; User ID = scott; Password = tiger"
-
Set R = Server.CreateObject("ADODB.Recordset")
-
-
-
If Not IsEmpty(Request.Form("submit")) then
-
vprmasno = Request.Form("vprmasno")
-
vempno = Request.Form("vempno")
-
vempname = Request.Form("vempname")
-
vdesign = Request.Form("vdesign")
-
vsex = Request.Form("vsex")
-
vdosyyyy = Request.Form("vdosyyyy")
-
vdosmm = Request.Form("vdosmm")
-
vdosdd = Request.Form("vdosdd")
-
vreason = Request.Form("vreason")
-
vplace = Request.Form("vplace")
-
vdobyyyy = Request.Form("vdobyyyy")
-
vdobmm = Request.Form("vdobmm")
-
vdobdd = Request.Form("vdobdd")
-
vprmas_unit = Request.Form("vprmas_unit")
-
vdoeyyyy = Request.Form("vdoeyyyy")
-
vdoemm = Request.Form("vdoemm")
-
vdoedd = Request.Form("vdoedd")
-
vgrade = Request.Form("vgrade")
-
vmem_fromyyyy = Request.Form("vmem_fromyyyy")
-
vmem_frommm = Request.Form("vmem_frommm")
-
vmem_fromdd = Request.Form("vmem_fromdd")
-
vmem_uptoyyyy = Request.Form("vmem_uptoyyyy")
-
vmem_uptomm = Request.Form("vmem_uptomm")
-
vmem_uptodd = Request.Form("vmem_uptodd")
-
vcontribution = Request.Form("vcontribution")
-
vcard_issued = Request.Form("vcard_issued")
-
vaddress = Request.Form("vaddress")
-
vcontact = Request.Form("vcontact")
-
vremarks = Request.Form("vremarks")
-
vdodyyyy = Request.Form("vdodyyyy")
-
vdodmm = Request.Form("vdodmm")
-
vdoddd = Request.Form("vdoddd")
-
vdodosyyyy = Request.Form("vdodosyyyy")
-
vdodosmm = Request.Form("vdodosmm")
-
vdodosdd = Request.Form("vdodosdd")
-
-
-
-
If len(vempno) = 0 then
-
errorMsg = "You must enter employee number."
-
End If
-
If len(errorMsg) = 0 Then
-
If len(vempname) = 0 Then
-
errorMsg = "Your must enter either employee name."
-
Elseif len(vdesign) > 20 Then
-
errorMsg = "The employee designation > 20 characters. Please reduce the size."
-
Else
-
For i = 1 to len(vdesign)
-
If instr(1, "_/()[]{}abcdefghijklmnopqrstuvwxyz0123456789 ", mid(vdesign, i, 1), vbTextCompare) = 0 then
-
errorMsg = "The employee designaton is invalid. Please re-enter this field."
-
Exit For
-
End If
-
Next
-
End If
-
End If
-
If len(errorMsg) = 0 Then
-
If len(vgrade) = 0 Then
-
errorMsg = "Your must enter grade of employee."
-
Elseif len(vgrade) > 10 Then
-
errorMsg = "The grade of employee > 10 characters. Please reduce the size."
-
Else
-
For i = 1 to len(vgrade)
-
If instr(1, "_/()[]{}IVABCDEFGHI12345678 ", mid(vgrade, i, 1), vbTextCompare) = 0 then
-
errorMsg = "The grade of employee is invalid. Please re-enter this field."
-
Exit For
-
End If
-
Next
-
End If
-
End If
-
If len(errorMsg) = 0 Then
-
SQL = "INSERT INTO prmas (prmasno, empno, empname, design, sex, dos, reason, place, dob, prmas_unit, doe, grade, mem_from, mem_upto, contribution, card_issued, address, contact, dod, dodos) VALUES(" & vprmasno & ", " & vempno & ", '" & vempname & "', '" & vdesign & "', '" & vsex & "', '" & Cdate(vdosmm & "/" & vdosdd & "/" & vdosyyyy) & "', '" & vreason & "', '" & vplace & "', '" & Cdate(vdobmm & "/" & vdobdd & "/" & vdobyyyy) & "', '" & vprmas_unit "', '" & CDate(vdoemm & "/" & vdoedd & "/" & vdoeyyyy) & "', '" & vgrade & "', '" & CDate(vmem_frommm & "/" & vmem_fromdd & "/" & vmem_fromyyyy) & "', '" & CDate(vmem_uptomm & "/" & vmem_uptodd & "/" & vmem_uptoyyyy) & "', " & vcontribution & ", " & vcard_issued & ", '" & vaddress & "', '" & vcontact & "', '" & CDate(vdodmm & "/" & vdoddd & "/" & vdodyyyy) & "', '" & CDate(vdobosmm & "/" & vdobosdd & "/" & vdodosyyyy) & "')"
-
Conn.Execute SQL
-
-
End If
-
End If
-
%>
-
<div style="Position:Absolute; top:120; left:50; background-color: #f0f0f0">
-
<h2>SABF Entry</h3>
-
<hr>
-
<p>
-
<form method="POST" action="prmas.asp">
-
<%
-
If len(errorMsg) > 0 Then
-
Response.Write "<p><font color='red'>" & errorMsg & "</font></p>"
-
End If
-
SQL = "SELECT count(*) vcount FROM prmas"
-
R.Open SQL, conn
-
vprmasno = R("vcount") + 1
-
%>
-
<table width=900>
-
<tr>
-
<table align="center">
-
<tr>
-
<td align="center"><font face="arial"><h3>Post Retirement Medical Assistance Scheme</h3></font></h3>
-
</tr>
-
</table>
-
</tr>
-
<tr>
-
<table align="center">
-
<tr>
-
<td align="right"><font face="arial" size=2>PRMAS No : </font></td>
-
<td align='left'><input type="text" style="width:100px" name="vprmasno" value=<%=vprmasno%>></td>
-
<td align="right"><font face="arial" size=2>Employee No : </font></td>
-
<td align='left'><input type="text" style="width:100px" name="vempno" value=<%=vempno%>></td>
-
</tr>
-
-
<tr>
-
<td align="right"><font face="arial" size=2>Employee Name : </font></td>
-
<td align='left'><input type="text" style="width:300px" name="vempname" value=<%=vempname%>></td>
-
<td align="right"><font face="arial" size=2>Designation : </font></td>
-
<td align='left'><input type="text" style="width:100px" name="vdesign" value=<%=vdesign%>></td>
-
</tr>
-
-
<tr>
-
<td align="right"><font face="arial" size=2>Sex : </font></td>
-
<td align='left'>
-
<select name="vsex" value=<%=vsex%>>
-
<option value="M">Male</option>
-
<option value="F">Female</option>
-
</select>
-
</td>
-
<td align="right"><font face="arial" size=2>Date of Seperation : </font></td>
-
<td align='left'>
-
<select name="vdosyyyy" value=<%=vdosyyyy%>>
-
<%i=1965
-
do while i <= year(date()) + 20
-
If i = Cint(vdosyyyy) Then%>
-
<option value="<%=vdosyyyy%>" selected><%=vdosyyyy%></option>
-
<%Else
-
If i = 2007 then
-
If IsEmpty(vdosyyyy) 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="vdosmm" value=<%=vdosmm%>>
-
<%i=1
-
Do while i <= 12
-
If i = Cint(vdosmm) then%>
-
<option value="<%=vdosmm%>" selected><%=vdosmm%></option>
-
<%Else%>
-
<option value="<%=i%>"><%=i%></option>
-
<%End If
-
i = i + 1
-
loop%>
-
</select>
-
<select name="vdosdd" value=<%=vdosdd%>>
-
<%If vdosyyyy mod 4 = 0 And vdosmm = 2 Then
-
no_of_day = 29
-
ElseIf vdosyyyy mod 4 <> 0 and vdosmm = 2 Then
-
no_of_day = 28
-
ElseIf vdosmm=4 or vdosmm=6 or vdosmm=9 or vdosmm=11 Then
-
no_of_day = 30
-
Else
-
no_of_day = 31
-
End If
-
i=1
-
Do while i <= no_of_day
-
If i = Cint(vdosdd) Then%>
-
<option value="<%=vdosdd%>" selected><%=vdosdd%></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>
-
-
<tr>
-
<td align="right"><font face="arial" size=2>Reason for Seperation : </font></td>
-
<td align='left'>
-
<select name="vreason" value=<%=vreason%>>
-
<option value="Retirement">Retirement</option>
-
<option value="Death">Death</option>
-
<option value="VRS">VRS</option>
-
<option value="OVSS">OVSS</option>
-
</select>
-
</td>
-
<td align="right"><font face="arial" size=2>Place of Seperation : </font></td>
-
<td align='left'><input type="text" style="width:100px" name="vplace" value=<%=vplace%>></td>
-
</tr>
-
<tr>
-
<td align="right"><font face="arial" size=2>Date of birth : </font></td>
-
<td>
-
<select name="vdobyyyy" value=<%=vdobyyyy%>>
-
<%i=1965
-
do while i <= year(date()) + 20
-
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" value=<%=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" value=<%=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>
-
<td align="right"><font face="arial" size=2>Reimbursing Unit : </font></td>
-
<td align='left'>
-
<select name="vprmas_unit" value=<%=vprmas_unit%>>
-
<option value="Guw">Guwahati</option>
-
<option value="Bar">Barauni</option>
-
<option value="Guj">Gujarat</option>
-
<option value="Hal">Haldia</option>
-
<option value="Mat">Mathura</option>
-
<option value="Pan">Panipat</option>
-
<option value="AOD">AOD</option>
-
<option value="Ref">Refineries Hqrs</option>
-
<option value="Lia">Liaison Office Kolkata</option>
-
<option value="PL">PL-GO and R&D</option>
-
<option value="Eas">Eastern and Western Regional Offices of Pipelines</option>
-
<option value="Reg">Regional & State Offices of Mktg. Divn & Mktg-HO</option>
-
</select>
-
</td>
-
</tr>
-
-
<tr>
-
<td align="right"><font face="arial" size=2>Date of Enrolment : </font></td>
-
<td>
-
<select name="vdoeyyyy" value=<%=vdoeyyyy%>>
-
<%i=1965
-
do while i <= year(date()) + 20
-
If i = Cint(vdoeyyyy) Then%>
-
<option value="<%=vdoeyyyy%>" selected><%=vdoeyyyy%></option>
-
<%Else
-
If i = 2007 then
-
If IsEmpty(vdoeyyyy) 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="vdoemm" value=<%=vdoemm%>>
-
<%i=1
-
Do while i <= 12
-
If i = Cint(vdoemm) then%>
-
<option value="<%=vdoemm%>" selected><%=vdoemm%></option>
-
<%Else%>
-
<option value="<%=i%>"><%=i%></option>
-
<%End If
-
i = i + 1
-
loop%>
-
</select>
-
<select name="vdoedd" value=<%=vdoedd%>>
-
<%If vdoeyyyy mod 4 = 0 And vdoemm = 2 Then
-
no_of_day = 29
-
ElseIf vdoeyyyy mod 4 <> 0 and vdoemm = 2 Then
-
no_of_day = 28
-
ElseIf vdoemm=4 or vdoemm=6 or vdoemm=9 or vdoemm=11 Then
-
no_of_day = 30
-
Else
-
no_of_day = 31
-
End If
-
i=1
-
Do while i <= no_of_day
-
If i = Cint(vdoedd) Then%>
-
<option value="<%=vdoedd%>" selected><%=vdoedd%></option>
-
<%Else%>
-
<option value="<%=i%>"><%=i%></option>
-
<%End If
-
i = i + 1
-
loop%>
-
</select><font color='blue' size=2>(yyyy-mm-dd)</font>
-
</td>
-
<td align="right"><font face="arial" size=2>Grade : </font></td>
-
<td><input type="text" style="width:200px" name="vgrade" value=<%=vgrade%>></td>
-
</tr>
-
<tr>
-
<td align="right"><font face="arial" size=2>Membership From : </font></td>
-
<td align='left'>
-
<select name="vmem_fromyyyy" value=<%=vmem_fromyyyy%>>
-
<%i=1965
-
do while i <= year(date()) + 20
-
If i = Cint(vmem_fromyyyy) Then%>
-
<option value="<%=vmem_fromyyyy%>" selected><%=vmem_fromyyyy%></option>
-
<%Else
-
If i = 2007 then
-
If IsEmpty(vmem_fromyyyy) 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="vmem_frommm" value=<%=vmem_frommm%>>
-
<%i=1
-
Do while i <= 12
-
If i = Cint(vmem_frommm) then%>
-
<option value="<%=vmem_frommm%>" selected><%=vmem_frommm%></option>
-
<%Else%>
-
<option value="<%=i%>"><%=i%></option>
-
<%End If
-
i = i + 1
-
loop%>
-
</select>
-
<select name="vmem_fromdd" value=<%=vmem_fromdd%>>
-
<%If vmem_fromyyyy mod 4 = 0 And vmem_frommm = 2 Then
-
no_of_day = 29
-
ElseIf vmem_fromyyyy mod 4 <> 0 and vmem_frommm = 2 Then
-
no_of_day = 28
-
ElseIf vmem_frommm=4 or vmem_frommm=6 or vmem_frommm=9 or vmem_frommm=11 Then
-
no_of_day = 30
-
Else
-
no_of_day = 31
-
End If
-
i=1
-
Do while i <= no_of_day
-
If i = Cint(vmem_fromdd) Then%>
-
<option value="<%=vmem_fromdd%>" selected><%=vmem_fromdd%></option>
-
<%Else%>
-
<option value="<%=i%>"><%=i%></option>
-
<%End If
-
i = i + 1
-
loop%>
-
</select><font color='blue' size=2>(yyyy-mm-dd)</font>
-
</td>
-
<td align="right"><font face="arial" size=2>Membership upto : </font></td>
-
<td align="left">
-
<select name="vmem_uptoyyyy" value=<%=vmem_uptoyyyy%>>
-
<%i=1965
-
do while i <= year(date()) + 50
-
If i = Cint(vmem_uptoyyyy) Then%>
-
<option value="<%=vmem_uptoyyyy%>" selected><%=vmem_uptoyyyy%></option>
-
<%Else
-
If i = 2007 then
-
If IsEmpty(vmem_uptoyyyy) 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="vmem_uptomm" value=<%=vmem_uptomm%>>
-
<%i=1
-
Do while i <= 12
-
If i = Cint(vmem_uptomm) then%>
-
<option value="<%=vmem_uptomm%>" selected><%=vmem_uptomm%></option>
-
<%Else%>
-
<option value="<%=i%>"><%=i%></option>
-
<%End If
-
i = i + 1
-
loop%>
-
</select>
-
<select name="vmem_uptodd" value=<%=vmem_uptodd%>>
-
<%If vmem_uptoyyyy mod 4 = 0 And vmem_uptomm = 2 Then
-
no_of_day = 29
-
ElseIf vmem_uptoyyyy mod 4 <> 0 and vmem_uptomm = 2 Then
-
no_of_day = 28
-
ElseIf vmem_uptomm=4 or vmem_uptomm=6 or vmem_uptomm=9 or vmem_uptomm=11 Then
-
no_of_day = 30
-
Else
-
no_of_day = 31
-
End If
-
i=1
-
Do while i <= no_of_day
-
If i = Cint(vmem_uptodd) Then%>
-
<option value="<%=vmem_uptodd%>" selected><%=vmem_uptodd%></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>
-
<tr>
-
<td align="right"><font face="arial" size=2>Contribution Amount : </font></td>
-
<td align='left'><input type="text" style="width:100px" name="vcontribution" value=<%=vcontribution%>></td>
-
<td align="right"><font face="arial" size=2>No. of Cards Issued : </font></td>
-
<td align='left'><input type="text" style="width:300px" name="vcard_issued" value=<%=vcard_issued%>></td>
-
</tr>
-
-
</table>
-
</tr>
-
-
<table align="center">
-
<tr>
-
<td align="right"><font face="arial" size=2>Mailing Address : </font></td>
-
<td align="left"><input type="text" style="width:575px" name="vaddress" value=<%=vaddress%>></td>
-
</tr>
-
</table>
-
<table align="center">
-
<tr>
-
<td align="right"><font face="arial" size=2>Contact No : </font></td>
-
<td align="left"><input type="text" style="width:200px" name="vcontact" value=<%=vcontact%>></td>
-
<td align="right"><font face="arial" size=2>Remarks : </font></td>
-
<td align="left"><input type="text" style="width:200px" name="vremarks" value=<%=vremarks%>></td>
-
</tr>
-
-
<tr>
-
<td align="right"><font face="arial" size=2>Date of Death : </font></td>
-
<td align="left">
-
<select name="vdodyyyy" value=<%=vdodyyyy%>>
-
<%i=1965
-
do while i <= year(date()) + 20
-
If i = Cint(vdodyyyy) Then%>
-
<option value="<%=vdodyyyy%>" selected><%=vdodyyyy%></option>
-
<%Else
-
If i = 2007 then
-
If IsEmpty(vdodyyyy) 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="vdodmm" value=<%=vdodmm%>>
-
<%i=1
-
Do while i <= 12
-
If i = Cint(vdodmm) then%>
-
<option value="<%=vdodmm%>" selected><%=vdodmm%></option>
-
<%Else%>
-
<option value="<%=i%>"><%=i%></option>
-
<%End If
-
i = i + 1
-
loop%>
-
</select>
-
<select name="vdoddd" value=<%=vdoddd%>>
-
<%If vdodyyyy mod 4 = 0 And vdodmm = 2 Then
-
no_of_day = 29
-
ElseIf vdodyyyy mod 4 <> 0 and vdodmm = 2 Then
-
no_of_day = 28
-
ElseIf vdodmm=4 or vdodmm=6 or vdodmm=9 or vdodmm=11 Then
-
no_of_day = 30
-
Else
-
no_of_day = 31
-
End If
-
i=1
-
Do while i <= no_of_day
-
If i = Cint(vdoddd) Then%>
-
<option value="<%=vdoddd%>" selected><%=vdoddd%></option>
-
<%Else%>
-
<option value="<%=i%>"><%=i%></option>
-
<%End If
-
i = i + 1
-
loop%>
-
</select><font color='blue' size=2>(yyyy-mm-dd)</font>
-
</td>
-
<td align="right"><font face="arial" size=2>Date of Death of Spouse : </font></td>
-
<td align="left">
-
<select name="vdodosyyyy" value=<%=vdodosyyyy%>>
-
<%i=1965
-
do while i <= year(date()) + 20
-
If i = Cint(vdodosyyyy) Then%>
-
<option value="<%=vdodosyyyy%>" selected><%=vdodosyyyy%></option>
-
<%Else
-
If i = 2007 then
-
If IsEmpty(vdodosyyyy) 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="vdodosmm" value=<%=vdodosmm%>>
-
<%i=1
-
Do while i <= 12
-
If i = Cint(vdodosmm) then%>
-
<option value="<%=vdodosmm%>" selected><%=vdodosmm%></option>
-
<%Else%>
-
<option value="<%=i%>"><%=i%></option>
-
<%End If
-
i = i + 1
-
loop%>
-
</select>
-
<select name="vdodosdd" value=<%=vdodosdd%>>
-
<%If vdodosyyyy mod 4 = 0 And vdodosmm = 2 Then
-
no_of_day = 29
-
ElseIf vdodosyyyy mod 4 <> 0 and vdodosmm = 2 Then
-
no_of_day = 28
-
ElseIf vdodosmm=4 or vdodosmm=6 or vdodosmm=9 or vdodosmm=11 Then
-
no_of_day = 30
-
Else
-
no_of_day = 31
-
End If
-
i=1
-
Do while i <= no_of_day
-
If i = Cint(vdodosdd) Then%>
-
<option value="<%=vdodosdd%>" selected><%=vdodosdd%></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>
-
<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>
-
</body>
-
</html>
-
CroCrew 564
Recognized Expert Contributor
What is the name of this page? is it "prmas.asp"?
Yes
the name of page is 'prmas.asp'
CroCrew 564
Recognized Expert Contributor
Hello vikas251074,
Can you copy off your page 'prmas.asp' to your desktop for safe keeping?
Then take the code below and only put that in the page and run it to see if you get the same results.
Try to enter 'Vikas Kumar' and press enter key like you did before. Does 'Vikas' only show up as the value again?
CroCrew~ -
<%
-
vempname = Request.Form("vempname")
-
%>
-
<html>
-
<head>
-
<title></title>
-
</head>
-
<body>
-
<form method="POST" action="prmas.asp">
-
Employee Name : <input type="text" style="width:300px" name="vempname" value=<%=vempname%>>
-
<input type="Submit" name="submit" value="Save">
-
</form>
-
</body>
-
</html>
-
Yes
Only 'Vikas' is retained, I entered 'Vikas Singh'
CroCrew 564
Recognized Expert Contributor
Really??
Just to make sure the only code on that page now is the 14 lines of code that I posted above right?
No other code is on the page right?
Yes sir
only the code you have given has been executed not even the extra space is used. I just copied all the lines by using ctrl+a and then paste to prmas.asp file. The result is same sir.
CroCrew 564
Recognized Expert Contributor
What do you get if you type "a b"? just the "a" back?
If I type "a b".
then only "a" is retained and "b" is lost.
CroCrew 564
Recognized Expert Contributor
Hello vikas251074,
I hate to tell you this. But there is nothing in that code that strips the string coming in. So I have to believe that you’re having some kind of web server issue. If the code that I posted did not strip parts of the incoming string then I was going to tell you to look into your “includes” to see if there was something going on in there. But, the code I posted uses no includes and is cut and dry in what it does.
I really think you have a web server configuration/corruption problem.
Sorry,
CroCrew~
Frinavale 9,735
Recognized Expert Moderator Expert
It's not a web server configuration problem.
The problem has to do with your invalid HTML.
For example, look at line 142 in your above posted code.
You have the following: - <td align='left'><input type="text" style="width:300px" name="vempname" value=<%=vempname%>></td>
Notice how you have value=<%=vempname%>
This is invalid. All values should have quotes around them. Change your code to the following: - <td align='left'><input type="text" style="width:300px" name="vempname" value="<%=vempname%>"></td>
And it will work properly.
If you ensure that your HTML is valid you will have less problems.
~Cheers~
-Frinny
Great !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Tusi Great Ho Sir ji. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Wonderful solution
Headache is cured
Thank you
jhardman 3,406
Recognized Expert Specialist
This is a good example of why validating your code is a good idea.
Jared
Sign in to post your reply or Sign up for a free account.
Similar topics
by: dave |
last post by:
Hello there,
I am at my wit's end ! I have used the following script succesfully to
upload an image to my web space. But what I really want to be able to do is
to update an existing record in a...
|
by: Jeremy Epstein |
last post by:
I've got a 4-page form that lets users enter a whole lot of information,
which is then submitted and emailed at the end. All the fields are
stored as session data.
The whole thing works fine:
...
|
by: merdaad |
last post by:
I am doing a database search from inside my class (vb)
file. I get back lines of data which I would like to
display in a new HTML page.
After I complete my search and find the records, I want...
|
by: cooldv |
last post by:
i know how to replace the sign " when SUBMITTING a form in asp by this
code:
message = Replace(usermessage, "'", "''").
My problem is DISPLAYING data in an asp FORM, from an an access
database,...
|
by: Brian F |
last post by:
Exactly what the subject says.
I have an ASP page that I want my C# windows application to open in
Internet Explorer, and if possible have it send along a list of values
from a list box. Thank you.
|
by: Celine |
last post by:
I have a webform with multiple panels with textboxes, dropdownlists,
radiobuttonlists, etc. The user navigates through the panels and then
submits the information at the end.
The first panel...
|
by: Ram |
last post by:
I have a strange problem with ASP.NET 1.1 SP1 application.
Application has a asp.net page which has a datagrid in it.( data grid/PAGE
has large amount of data. always more than 1MB). There is a...
|
by: Vic Spainhower |
last post by:
Hello,
Can someone tell me why on some computers the following list will fail . I
have a user reported that some of the links in the below list will fail and
some will work. The ones that fail...
|
by: Bruce A. Julseth |
last post by:
Page A is an input data page. Before all the data input is complete, a user
might have to call an intermediate page B. After completing page B, page B
will return the user to A. The problem. The...
|
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,...
|
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,...
|
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...
|
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...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
|
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...
|
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 ...
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |