some data is lost when page submitted in list

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • vikas251074
    New Member
    • Dec 2007
    • 198

    some data is lost when page submitted in list

    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?
  • CroCrew
    Recognized Expert Contributor
    • Jan 2008
    • 564

    #2
    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~

    Comment

    • vikas251074
      New Member
      • Dec 2007
      • 198

      #3
      OK sir
      I first try in Advance search

      Comment

      • CroCrew
        Recognized Expert Contributor
        • Jan 2008
        • 564

        #4
        Hello vikas251074,

        Sorry not "Advance Search" but "Go Advanced". See the button to the right of "Post Quick Reply"?

        Comment

        • CroCrew
          Recognized Expert Contributor
          • Jan 2008
          • 564

          #5
          Your code above is fine. That is why we need to see all of the code to find out where the problem is.

          Comment

          • vikas251074
            New Member
            • Dec 2007
            • 198

            #6
            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.



            Code:
            <%@ 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>

            Comment

            • CroCrew
              Recognized Expert Contributor
              • Jan 2008
              • 564

              #7
              What is the name of this page? is it "prmas.asp" ?

              Comment

              • vikas251074
                New Member
                • Dec 2007
                • 198

                #8
                Yes
                the name of page is 'prmas.asp'

                Comment

                • CroCrew
                  Recognized Expert Contributor
                  • Jan 2008
                  • 564

                  #9
                  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~

                  Code:
                  <% 
                  	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>

                  Comment

                  • vikas251074
                    New Member
                    • Dec 2007
                    • 198

                    #10
                    Yes

                    Only 'Vikas' is retained, I entered 'Vikas Singh'

                    Comment

                    • CroCrew
                      Recognized Expert Contributor
                      • Jan 2008
                      • 564

                      #11
                      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?

                      Comment

                      • vikas251074
                        New Member
                        • Dec 2007
                        • 198

                        #12
                        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.

                        Comment

                        • CroCrew
                          Recognized Expert Contributor
                          • Jan 2008
                          • 564

                          #13
                          What do you get if you type "a b"? just the "a" back?

                          Comment

                          • vikas251074
                            New Member
                            • Dec 2007
                            • 198

                            #14
                            If I type "a b".

                            then only "a" is retained and "b" is lost.

                            Comment

                            • CroCrew
                              Recognized Expert Contributor
                              • Jan 2008
                              • 564

                              #15
                              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~

                              Comment

                              Working...