473,804 Members | 2,020 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

some data is lost when page submitted in list

vikas251074
198 New Member
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?
Oct 14 '09 #1
17 2247
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~
Oct 14 '09 #2
vikas251074
198 New Member
OK sir
I first try in Advance search
Oct 14 '09 #3
CroCrew
564 Recognized Expert Contributor
Hello vikas251074,

Sorry not "Advance Search" but "Go Advanced". See the button to the right of "Post Quick Reply"?
Oct 14 '09 #4
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.
Oct 14 '09 #5
vikas251074
198 New Member
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.



Expand|Select|Wrap|Line Numbers
  1. <%@ Language=VBScript%>
  2. <%Option Explicit%>
  3. <html>
  4. <head>
  5. <title>Barauni Refinery - Gratuity & Pension Control of Ex-Empoyee</title>
  6. <!--#include file="font.css"-->
  7. <!--#include file="func.inc"-->
  8. <!--#include file="head.inc"-->
  9. </head>
  10.  
  11. <%
  12. Dim R
  13. Dim vprmasno, vempno, vempname, vdesign, vsex, vreason, vplace, vprmas_unit, vgrade, vcontribution, vcard_issued
  14. Dim vaddress, vcontact, vremarks
  15. Dim errorMsg
  16. Dim conn
  17. Dim i
  18. Dim SQL
  19. Dim vdosyyyy, vdosmm, vdosdd
  20. Dim vdobyyyy, vdobmm, vdobdd
  21. Dim vdoeyyyy, vdoemm, vdoedd
  22. Dim vmem_fromyyyy, vmem_frommm, vmem_fromdd
  23. Dim vmem_uptoyyyy, vmem_uptomm, vmem_uptodd
  24. Dim vdodyyyy, vdodmm, vdoddd
  25. Dim vdodosyyyy, vdodosmm, vdodosdd
  26. Dim no_of_day
  27.  
  28. Set conn = Server.Createobject("ADODB.Connection")
  29. conn.Open "DSN=ORA; User ID = scott; Password = tiger"
  30. Set R = Server.CreateObject("ADODB.Recordset")
  31.  
  32.  
  33.   If Not IsEmpty(Request.Form("submit")) then
  34.     vprmasno = Request.Form("vprmasno")
  35.     vempno = Request.Form("vempno")
  36.     vempname = Request.Form("vempname")
  37.     vdesign = Request.Form("vdesign")
  38.     vsex = Request.Form("vsex")
  39.     vdosyyyy = Request.Form("vdosyyyy")
  40.     vdosmm = Request.Form("vdosmm")
  41.     vdosdd = Request.Form("vdosdd")
  42.     vreason = Request.Form("vreason")
  43.     vplace = Request.Form("vplace")
  44.     vdobyyyy = Request.Form("vdobyyyy")
  45.     vdobmm = Request.Form("vdobmm")
  46.     vdobdd = Request.Form("vdobdd")
  47.     vprmas_unit = Request.Form("vprmas_unit")
  48.     vdoeyyyy = Request.Form("vdoeyyyy")
  49.     vdoemm = Request.Form("vdoemm")
  50.     vdoedd = Request.Form("vdoedd")
  51.     vgrade = Request.Form("vgrade")
  52.     vmem_fromyyyy = Request.Form("vmem_fromyyyy")
  53.     vmem_frommm = Request.Form("vmem_frommm")
  54.     vmem_fromdd = Request.Form("vmem_fromdd")
  55.     vmem_uptoyyyy = Request.Form("vmem_uptoyyyy")
  56.     vmem_uptomm = Request.Form("vmem_uptomm")
  57.     vmem_uptodd = Request.Form("vmem_uptodd")
  58.     vcontribution = Request.Form("vcontribution")
  59.     vcard_issued = Request.Form("vcard_issued")
  60.     vaddress = Request.Form("vaddress")
  61.     vcontact = Request.Form("vcontact")
  62.     vremarks = Request.Form("vremarks")
  63.     vdodyyyy = Request.Form("vdodyyyy")
  64.     vdodmm = Request.Form("vdodmm")
  65.     vdoddd = Request.Form("vdoddd")
  66.     vdodosyyyy = Request.Form("vdodosyyyy")
  67.     vdodosmm = Request.Form("vdodosmm")
  68.     vdodosdd = Request.Form("vdodosdd")
  69.  
  70.  
  71.  
  72.     If len(vempno) = 0 then
  73.       errorMsg = "You must enter employee number."
  74.     End If
  75.     If len(errorMsg) = 0 Then
  76.       If len(vempname) = 0 Then
  77.         errorMsg = "Your must enter either employee name."
  78.       Elseif len(vdesign) > 20 Then
  79.         errorMsg = "The employee designation > 20 characters. Please reduce the size."
  80.       Else
  81.         For i = 1 to len(vdesign)
  82.           If instr(1, "_/()[]{}abcdefghijklmnopqrstuvwxyz0123456789 ", mid(vdesign, i, 1), vbTextCompare) = 0 then
  83.             errorMsg = "The employee designaton is invalid. Please re-enter this field."
  84.             Exit For
  85.           End If
  86.         Next
  87.       End If
  88.     End If
  89.     If len(errorMsg) = 0 Then
  90.       If len(vgrade) = 0 Then
  91.         errorMsg = "Your must enter grade of employee."
  92.       Elseif len(vgrade) > 10 Then
  93.         errorMsg = "The grade of employee > 10 characters. Please reduce the size."
  94.       Else
  95.         For i = 1 to len(vgrade)
  96.           If instr(1, "_/()[]{}IVABCDEFGHI12345678 ", mid(vgrade, i, 1), vbTextCompare) = 0 then
  97.             errorMsg = "The grade of employee is invalid. Please re-enter this field."
  98.             Exit For
  99.           End If
  100.         Next
  101.       End If
  102.     End If
  103.     If len(errorMsg) = 0 Then
  104.       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) & "')"
  105.               Conn.Execute SQL 
  106.  
  107.     End If
  108.   End If
  109. %>
  110.   <div style="Position:Absolute; top:120; left:50; background-color: #f0f0f0">
  111.     <h2>SABF Entry</h3>
  112.     <hr>
  113.     <p>
  114.     <form method="POST" action="prmas.asp">
  115. <%
  116.       If len(errorMsg) > 0 Then
  117.         Response.Write "<p><font color='red'>" & errorMsg & "</font></p>"
  118.       End If
  119. SQL = "SELECT count(*) vcount FROM prmas"
  120. R.Open SQL, conn
  121. vprmasno = R("vcount") + 1
  122. %>
  123.       <table width=900>
  124.         <tr>
  125.           <table align="center">
  126.             <tr>
  127.               <td align="center"><font face="arial"><h3>Post Retirement Medical Assistance Scheme</h3></font></h3>
  128.             </tr>
  129.           </table>
  130.         </tr>
  131.         <tr>
  132.           <table align="center">
  133.             <tr>
  134.               <td align="right"><font face="arial" size=2>PRMAS No : </font></td>
  135.               <td align='left'><input type="text" style="width:100px" name="vprmasno" value=<%=vprmasno%>></td>
  136.               <td align="right"><font face="arial" size=2>Employee No : </font></td>
  137.               <td align='left'><input type="text" style="width:100px" name="vempno" value=<%=vempno%>></td>
  138.             </tr>
  139.  
  140.             <tr>
  141.               <td align="right"><font face="arial" size=2>Employee Name : </font></td>
  142.               <td align='left'><input type="text" style="width:300px" name="vempname" value=<%=vempname%>></td>
  143.               <td align="right"><font face="arial" size=2>Designation : </font></td>
  144.               <td align='left'><input type="text" style="width:100px" name="vdesign" value=<%=vdesign%>></td>
  145.             </tr>
  146.  
  147.             <tr>
  148.               <td align="right"><font face="arial" size=2>Sex : </font></td>
  149.               <td align='left'>
  150.                 <select name="vsex" value=<%=vsex%>>
  151.                   <option value="M">Male</option>
  152.                   <option value="F">Female</option>
  153.                 </select>
  154.               </td>
  155.               <td align="right"><font face="arial" size=2>Date of Seperation : </font></td>
  156.               <td align='left'>
  157.                 <select name="vdosyyyy" value=<%=vdosyyyy%>>
  158.                   <%i=1965
  159.                   do while i <= year(date()) + 20
  160.                     If i = Cint(vdosyyyy) Then%>
  161.                       <option value="<%=vdosyyyy%>" selected><%=vdosyyyy%></option>
  162.                     <%Else
  163.                       If i = 2007 then
  164.                         If IsEmpty(vdosyyyy) Then%>
  165.                           <option value="<%=i%>" selected><%=i%></option>
  166.                         <%End If
  167.                       else%>
  168.                         <option value="<%=i%>"><%=i%></option>
  169.                       <%end If
  170.                     End If
  171.                     i = i + 1
  172.                   loop%>
  173.                 </select>
  174.                 <select name="vdosmm" value=<%=vdosmm%>>
  175.                   <%i=1
  176.                   Do while i <= 12
  177.                     If i = Cint(vdosmm) then%>
  178.                       <option value="<%=vdosmm%>" selected><%=vdosmm%></option>
  179.                     <%Else%>
  180.                       <option value="<%=i%>"><%=i%></option>
  181.                     <%End If
  182.                     i = i + 1
  183.                   loop%>
  184.                 </select>
  185.                 <select name="vdosdd" value=<%=vdosdd%>>
  186.                   <%If vdosyyyy mod 4 = 0 And vdosmm = 2 Then
  187.                     no_of_day = 29
  188.                   ElseIf vdosyyyy mod 4 <> 0 and vdosmm = 2 Then
  189.                     no_of_day = 28
  190.                   ElseIf vdosmm=4 or vdosmm=6 or vdosmm=9 or vdosmm=11 Then
  191.                     no_of_day = 30
  192.                   Else
  193.                     no_of_day = 31
  194.                   End If
  195.                   i=1
  196.                   Do while i <= no_of_day
  197.                     If i = Cint(vdosdd) Then%>
  198.                       <option value="<%=vdosdd%>" selected><%=vdosdd%></option>
  199.                     <%Else%>
  200.                       <option value="<%=i%>"><%=i%></option>
  201.                     <%End If
  202.                     i = i + 1
  203.                   loop%>
  204.                 </select><font color='blue' size=2>(yyyy-mm-dd)</font>
  205.               </td>
  206.             </tr>
  207.  
  208.             <tr>
  209.               <td align="right"><font face="arial" size=2>Reason for Seperation : </font></td>
  210.               <td align='left'> 
  211.                 <select name="vreason" value=<%=vreason%>>
  212.                   <option value="Retirement">Retirement</option>
  213.                   <option value="Death">Death</option>
  214.                   <option value="VRS">VRS</option>
  215.                   <option value="OVSS">OVSS</option>
  216.                 </select>
  217.               </td>
  218.               <td align="right"><font face="arial" size=2>Place of Seperation : </font></td>
  219.               <td align='left'><input type="text" style="width:100px" name="vplace" value=<%=vplace%>></td>
  220.             </tr>
  221.             <tr>
  222.               <td align="right"><font face="arial" size=2>Date of birth : </font></td>
  223.               <td>
  224.                 <select name="vdobyyyy" value=<%=vdobyyyy%>>
  225.                   <%i=1965
  226.                   do while i <= year(date()) + 20
  227.                     If i = Cint(vdobyyyy) Then%>
  228.                       <option value="<%=vdobyyyy%>" selected><%=vdobyyyy%></option>
  229.                     <%Else
  230.                       If i = 2007 then
  231.                         If IsEmpty(vdobyyyy) Then%>
  232.                           <option value="<%=i%>" selected><%=i%></option>
  233.                         <%End If
  234.                       else%>
  235.                         <option value="<%=i%>"><%=i%></option>
  236.                       <%end If
  237.                     End If
  238.                     i = i + 1
  239.                   loop%>
  240.                 </select>
  241.                 <select name="vdobmm" value=<%=vdobmm%>>
  242.                   <%i=1
  243.                   Do while i <= 12
  244.                     If i = Cint(vdobmm) then%>
  245.                       <option value="<%=vdobmm%>" selected><%=vdobmm%></option>
  246.                     <%Else%>
  247.                       <option value="<%=i%>"><%=i%></option>
  248.                     <%End If
  249.                     i = i + 1
  250.                   loop%>
  251.                 </select>
  252.                 <select name="vdobdd" value=<%=vdobdd%>>
  253.                   <%If vdobyyyy mod 4 = 0 And vdobmm = 2 Then
  254.                     no_of_day = 29
  255.                   ElseIf vdobyyyy mod 4 <> 0 and vdobmm = 2 Then
  256.                     no_of_day = 28
  257.                   ElseIf vdobmm=4 or vdobmm=6 or vdobmm=9 or vdobmm=11 Then
  258.                     no_of_day = 30
  259.                   Else
  260.                     no_of_day = 31
  261.                   End If
  262.                   i=1
  263.                   Do while i <= no_of_day
  264.                     If i = Cint(vdobdd) Then%>
  265.                       <option value="<%=vdobdd%>" selected><%=vdobdd%></option>
  266.                     <%Else%>
  267.                       <option value="<%=i%>"><%=i%></option>
  268.                     <%End If
  269.                     i = i + 1
  270.                   loop%>
  271.                 </select><font color='blue' size=2>(yyyy-mm-dd)</font>
  272.               </td>
  273.               <td align="right"><font face="arial" size=2>Reimbursing Unit : </font></td>
  274.               <td align='left'>
  275.                 <select name="vprmas_unit" value=<%=vprmas_unit%>>
  276.                   <option value="Guw">Guwahati</option>
  277.                   <option value="Bar">Barauni</option>
  278.                   <option value="Guj">Gujarat</option>
  279.                   <option value="Hal">Haldia</option>
  280.                   <option value="Mat">Mathura</option>
  281.                   <option value="Pan">Panipat</option>
  282.                   <option value="AOD">AOD</option>
  283.                   <option value="Ref">Refineries Hqrs</option>
  284.                   <option value="Lia">Liaison Office Kolkata</option>
  285.                   <option value="PL">PL-GO and R&D</option>
  286.                   <option value="Eas">Eastern and Western Regional Offices of Pipelines</option>
  287.                   <option value="Reg">Regional & State Offices of Mktg. Divn & Mktg-HO</option>
  288.                 </select>
  289.               </td>
  290.             </tr>
  291.  
  292.             <tr>
  293.               <td align="right"><font face="arial" size=2>Date of Enrolment : </font></td>
  294.               <td>
  295.                 <select name="vdoeyyyy" value=<%=vdoeyyyy%>>
  296.                   <%i=1965
  297.                   do while i <= year(date()) + 20
  298.                     If i = Cint(vdoeyyyy) Then%>
  299.                       <option value="<%=vdoeyyyy%>" selected><%=vdoeyyyy%></option>
  300.                     <%Else
  301.                       If i = 2007 then
  302.                         If IsEmpty(vdoeyyyy) Then%>
  303.                           <option value="<%=i%>" selected><%=i%></option>
  304.                         <%End If
  305.                       else%>
  306.                         <option value="<%=i%>"><%=i%></option>
  307.                       <%end If
  308.                     End If
  309.                     i = i + 1
  310.                   loop%>
  311.                 </select>
  312.                 <select name="vdoemm" value=<%=vdoemm%>>
  313.                   <%i=1
  314.                   Do while i <= 12
  315.                     If i = Cint(vdoemm) then%>
  316.                       <option value="<%=vdoemm%>" selected><%=vdoemm%></option>
  317.                     <%Else%>
  318.                       <option value="<%=i%>"><%=i%></option>
  319.                     <%End If
  320.                     i = i + 1
  321.                   loop%>
  322.                 </select>
  323.                 <select name="vdoedd" value=<%=vdoedd%>>
  324.                   <%If vdoeyyyy mod 4 = 0 And vdoemm = 2 Then
  325.                     no_of_day = 29
  326.                   ElseIf vdoeyyyy mod 4 <> 0 and vdoemm = 2 Then
  327.                     no_of_day = 28
  328.                   ElseIf vdoemm=4 or vdoemm=6 or vdoemm=9 or vdoemm=11 Then
  329.                     no_of_day = 30
  330.                   Else
  331.                     no_of_day = 31
  332.                   End If
  333.                   i=1
  334.                   Do while i <= no_of_day
  335.                     If i = Cint(vdoedd) Then%>
  336.                       <option value="<%=vdoedd%>" selected><%=vdoedd%></option>
  337.                     <%Else%>
  338.                       <option value="<%=i%>"><%=i%></option>
  339.                     <%End If
  340.                     i = i + 1
  341.                   loop%>
  342.                 </select><font color='blue' size=2>(yyyy-mm-dd)</font>
  343.               </td>
  344.               <td align="right"><font face="arial" size=2>Grade : </font></td>
  345.               <td><input type="text" style="width:200px" name="vgrade" value=<%=vgrade%>></td>
  346.             </tr>
  347.             <tr>
  348.               <td align="right"><font face="arial" size=2>Membership From : </font></td>
  349.               <td align='left'>
  350.                 <select name="vmem_fromyyyy" value=<%=vmem_fromyyyy%>>
  351.                   <%i=1965
  352.                   do while i <= year(date()) + 20
  353.                     If i = Cint(vmem_fromyyyy) Then%>
  354.                       <option value="<%=vmem_fromyyyy%>" selected><%=vmem_fromyyyy%></option>
  355.                     <%Else
  356.                       If i = 2007 then
  357.                         If IsEmpty(vmem_fromyyyy) Then%>
  358.                           <option value="<%=i%>" selected><%=i%></option>
  359.                         <%End If
  360.                       else%>
  361.                         <option value="<%=i%>"><%=i%></option>
  362.                       <%end If
  363.                     End If
  364.                     i = i + 1
  365.                   loop%>
  366.                 </select>
  367.                 <select name="vmem_frommm" value=<%=vmem_frommm%>>
  368.                   <%i=1
  369.                   Do while i <= 12
  370.                     If i = Cint(vmem_frommm) then%>
  371.                       <option value="<%=vmem_frommm%>" selected><%=vmem_frommm%></option>
  372.                     <%Else%>
  373.                       <option value="<%=i%>"><%=i%></option>
  374.                     <%End If
  375.                     i = i + 1
  376.                   loop%>
  377.                 </select>
  378.                 <select name="vmem_fromdd" value=<%=vmem_fromdd%>>
  379.                   <%If vmem_fromyyyy mod 4 = 0 And vmem_frommm = 2 Then
  380.                     no_of_day = 29
  381.                   ElseIf vmem_fromyyyy mod 4 <> 0 and vmem_frommm = 2 Then
  382.                     no_of_day = 28
  383.                   ElseIf vmem_frommm=4 or vmem_frommm=6 or vmem_frommm=9 or vmem_frommm=11 Then
  384.                     no_of_day = 30
  385.                   Else
  386.                     no_of_day = 31
  387.                   End If
  388.                   i=1
  389.                   Do while i <= no_of_day
  390.                     If i = Cint(vmem_fromdd) Then%>
  391.                       <option value="<%=vmem_fromdd%>" selected><%=vmem_fromdd%></option>
  392.                     <%Else%>
  393.                       <option value="<%=i%>"><%=i%></option>
  394.                     <%End If
  395.                     i = i + 1
  396.                   loop%>
  397.                 </select><font color='blue' size=2>(yyyy-mm-dd)</font>
  398.               </td>
  399.               <td align="right"><font face="arial" size=2>Membership upto : </font></td>
  400.               <td align="left">
  401.                 <select name="vmem_uptoyyyy" value=<%=vmem_uptoyyyy%>>
  402.                   <%i=1965
  403.                   do while i <= year(date()) + 50
  404.                     If i = Cint(vmem_uptoyyyy) Then%>
  405.                       <option value="<%=vmem_uptoyyyy%>" selected><%=vmem_uptoyyyy%></option>
  406.                     <%Else
  407.                       If i = 2007 then
  408.                         If IsEmpty(vmem_uptoyyyy) Then%>
  409.                           <option value="<%=i%>" selected><%=i%></option>
  410.                         <%End If
  411.                       else%>
  412.                         <option value="<%=i%>"><%=i%></option>
  413.                       <%end If
  414.                     End If
  415.                     i = i + 1
  416.                   loop%>
  417.                 </select>
  418.                 <select name="vmem_uptomm" value=<%=vmem_uptomm%>>
  419.                   <%i=1
  420.                   Do while i <= 12
  421.                     If i = Cint(vmem_uptomm) then%>
  422.                       <option value="<%=vmem_uptomm%>" selected><%=vmem_uptomm%></option>
  423.                     <%Else%>
  424.                       <option value="<%=i%>"><%=i%></option>
  425.                     <%End If
  426.                     i = i + 1
  427.                   loop%>
  428.                 </select>
  429.                 <select name="vmem_uptodd" value=<%=vmem_uptodd%>>
  430.                   <%If vmem_uptoyyyy mod 4 = 0 And vmem_uptomm = 2 Then
  431.                     no_of_day = 29
  432.                   ElseIf vmem_uptoyyyy mod 4 <> 0 and vmem_uptomm = 2 Then
  433.                     no_of_day = 28
  434.                   ElseIf vmem_uptomm=4 or vmem_uptomm=6 or vmem_uptomm=9 or vmem_uptomm=11 Then
  435.                     no_of_day = 30
  436.                   Else
  437.                     no_of_day = 31
  438.                   End If
  439.                   i=1
  440.                   Do while i <= no_of_day
  441.                     If i = Cint(vmem_uptodd) Then%>
  442.                       <option value="<%=vmem_uptodd%>" selected><%=vmem_uptodd%></option>
  443.                     <%Else%>
  444.                       <option value="<%=i%>"><%=i%></option>
  445.                     <%End If
  446.                     i = i + 1
  447.                   loop%>
  448.                 </select><font color='blue' size=2>(yyyy-mm-dd)</font>
  449.               </td>
  450.             </tr>
  451.             <tr>
  452.               <td align="right"><font face="arial" size=2>Contribution Amount : </font></td>
  453.               <td align='left'><input type="text" style="width:100px" name="vcontribution" value=<%=vcontribution%>></td>
  454.               <td align="right"><font face="arial" size=2>No. of Cards Issued : </font></td>
  455.               <td align='left'><input type="text" style="width:300px" name="vcard_issued" value=<%=vcard_issued%>></td>
  456.             </tr>
  457.  
  458.           </table>
  459.         </tr>
  460.  
  461.         <table align="center">
  462.           <tr>
  463.             <td align="right"><font face="arial" size=2>Mailing Address : </font></td>
  464.             <td align="left"><input type="text" style="width:575px" name="vaddress" value=<%=vaddress%>></td>
  465.           </tr>
  466.         </table>
  467.         <table align="center">
  468.           <tr>
  469.             <td align="right"><font face="arial" size=2>Contact No : </font></td>
  470.             <td align="left"><input type="text" style="width:200px" name="vcontact" value=<%=vcontact%>></td>
  471.             <td align="right"><font face="arial" size=2>Remarks : </font></td>
  472.             <td align="left"><input type="text" style="width:200px" name="vremarks" value=<%=vremarks%>></td>
  473.           </tr>
  474.  
  475.           <tr>
  476.             <td align="right"><font face="arial" size=2>Date of Death : </font></td>
  477.             <td align="left">
  478.                 <select name="vdodyyyy" value=<%=vdodyyyy%>>
  479.                   <%i=1965
  480.                   do while i <= year(date()) + 20
  481.                     If i = Cint(vdodyyyy) Then%>
  482.                       <option value="<%=vdodyyyy%>" selected><%=vdodyyyy%></option>
  483.                     <%Else
  484.                       If i = 2007 then
  485.                         If IsEmpty(vdodyyyy) Then%>
  486.                           <option value="<%=i%>" selected><%=i%></option>
  487.                         <%End If
  488.                       else%>
  489.                         <option value="<%=i%>"><%=i%></option>
  490.                       <%end If
  491.                     End If
  492.                     i = i + 1
  493.                   loop%>
  494.                 </select>
  495.                 <select name="vdodmm" value=<%=vdodmm%>>
  496.                   <%i=1
  497.                   Do while i <= 12
  498.                     If i = Cint(vdodmm) then%>
  499.                       <option value="<%=vdodmm%>" selected><%=vdodmm%></option>
  500.                     <%Else%>
  501.                       <option value="<%=i%>"><%=i%></option>
  502.                     <%End If
  503.                     i = i + 1
  504.                   loop%>
  505.                 </select>
  506.                 <select name="vdoddd" value=<%=vdoddd%>>
  507.                   <%If vdodyyyy mod 4 = 0 And vdodmm = 2 Then
  508.                     no_of_day = 29
  509.                   ElseIf vdodyyyy mod 4 <> 0 and vdodmm = 2 Then
  510.                     no_of_day = 28
  511.                   ElseIf vdodmm=4 or vdodmm=6 or vdodmm=9 or vdodmm=11 Then
  512.                     no_of_day = 30
  513.                   Else
  514.                     no_of_day = 31
  515.                   End If
  516.                   i=1
  517.                   Do while i <= no_of_day
  518.                     If i = Cint(vdoddd) Then%>
  519.                       <option value="<%=vdoddd%>" selected><%=vdoddd%></option>
  520.                     <%Else%>
  521.                       <option value="<%=i%>"><%=i%></option>
  522.                     <%End If
  523.                     i = i + 1
  524.                   loop%>
  525.                 </select><font color='blue' size=2>(yyyy-mm-dd)</font>
  526.             </td>
  527.             <td align="right"><font face="arial" size=2>Date of Death of Spouse : </font></td>
  528.             <td align="left">
  529.                 <select name="vdodosyyyy" value=<%=vdodosyyyy%>>
  530.                   <%i=1965
  531.                   do while i <= year(date()) + 20
  532.                     If i = Cint(vdodosyyyy) Then%>
  533.                       <option value="<%=vdodosyyyy%>" selected><%=vdodosyyyy%></option>
  534.                     <%Else
  535.                       If i = 2007 then
  536.                         If IsEmpty(vdodosyyyy) Then%>
  537.                           <option value="<%=i%>" selected><%=i%></option>
  538.                         <%End If
  539.                       else%>
  540.                         <option value="<%=i%>"><%=i%></option>
  541.                       <%end If
  542.                     End If
  543.                     i = i + 1
  544.                   loop%>
  545.                 </select>
  546.                 <select name="vdodosmm" value=<%=vdodosmm%>>
  547.                   <%i=1
  548.                   Do while i <= 12
  549.                     If i = Cint(vdodosmm) then%>
  550.                       <option value="<%=vdodosmm%>" selected><%=vdodosmm%></option>
  551.                     <%Else%>
  552.                       <option value="<%=i%>"><%=i%></option>
  553.                     <%End If
  554.                     i = i + 1
  555.                   loop%>
  556.                 </select>
  557.                 <select name="vdodosdd" value=<%=vdodosdd%>>
  558.                   <%If vdodosyyyy mod 4 = 0 And vdodosmm = 2 Then
  559.                     no_of_day = 29
  560.                   ElseIf vdodosyyyy mod 4 <> 0 and vdodosmm = 2 Then
  561.                     no_of_day = 28
  562.                   ElseIf vdodosmm=4 or vdodosmm=6 or vdodosmm=9 or vdodosmm=11 Then
  563.                     no_of_day = 30
  564.                   Else
  565.                     no_of_day = 31
  566.                   End If
  567.                   i=1
  568.                   Do while i <= no_of_day
  569.                     If i = Cint(vdodosdd) Then%>
  570.                       <option value="<%=vdodosdd%>" selected><%=vdodosdd%></option>
  571.                     <%Else%>
  572.                       <option value="<%=i%>"><%=i%></option>
  573.                     <%End If
  574.                     i = i + 1
  575.                   loop%>
  576.                 </select><font color='blue' size=2>(yyyy-mm-dd)</font>
  577.             </td>
  578.           </tr> 
  579.  
  580.         </table> 
  581.         <tr>
  582.           <table align="center">
  583.             <tr>
  584.               <td align="center"><input type="Submit" name="submit" value="Save">
  585.                                  <input type="reset" name="reset" value="Reset">
  586.               </td>
  587.             </tr>
  588.           </table>
  589.         </tr>
  590.       </table>
  591.     </form>
  592.     </p>
  593.   </div>
  594. </body>
  595. </html>
  596.  
Oct 14 '09 #6
CroCrew
564 Recognized Expert Contributor
What is the name of this page? is it "prmas.asp" ?
Oct 14 '09 #7
vikas251074
198 New Member
Yes
the name of page is 'prmas.asp'
Oct 14 '09 #8
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~

Expand|Select|Wrap|Line Numbers
  1. <% 
  2.     vempname = Request.Form("vempname") 
  3. %> 
  4. <html> 
  5.     <head> 
  6.         <title></title> 
  7.     </head> 
  8.     <body>
  9.         <form method="POST" action="prmas.asp"> 
  10.             Employee Name : <input type="text" style="width:300px" name="vempname" value=<%=vempname%>>
  11.             <input type="Submit" name="submit" value="Save"> 
  12.         </form> 
  13.     </body> 
  14. </html>   
  15.  
Oct 14 '09 #9
vikas251074
198 New Member
Yes

Only 'Vikas' is retained, I entered 'Vikas Singh'
Oct 14 '09 #10

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

Similar topics

3
11769
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 table in MySQL with the path & filename to the image. I have successfully uploaded and performed an update query on the database, but the problem I have is I cannot retain the primary key field in a variable which is then used in a SQL update...
3
9292
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: 1. On my local box (WinXP / Apache2 / PHP4) using IE6 2. On my local box using Firefox1 3. On my hosted server (RHLinux / Apache1.3 / PHP4) using IE6
0
1455
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 to immediately display the items without having to go to the database again. So I do a response.redirect ("schoutput.aspx") The new serach screen appears but my data (the list of my found items) is lost.
9
2377
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, when the data already contains a " sign problem is like this: access database .... to update on the internet .... a *dataupdate.asp* page ..... On this page, the data gets displayed in a form where i
8
3371
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.
3
23776
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 contains a text box where users can enter a search term. A "next" button displays the following panel causing a stored procedure to populate a dropdown list. The dropdown list displays the results of the search, and requires users to select an...
2
2386
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 hyperlink in the grid which will open up another detail from. Problem is some times when I click on the hyperlink, the page never opens and system shows white blank IE
18
2466
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 will have the www missing in the URL. For example when this particular computer will have the link as http://mysite.com/entry_page.php instead of http://www.mysite.com/entry_page.php This is only happening on 1 computer as far as I know and I...
4
1948
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 values entered on page before the user called page B, are lost. I "think" I read somewhere that to preserve the values, I save use Cookies. Is that correct? Is there any other way? Thanks....
0
10604
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
10354
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
10101
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
9177
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6870
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5536
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
5675
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4314
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
2
3837
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.