Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

no data is being passed in the post

Status
Not open for further replies.

kamfl610

Programmer
Apr 15, 2003
90
US
Hi all,

I've got a problem. Right now I'm just trying to get one form to work right. When I click on my "Save" button on the form, the javascript is working right because I'm going to my Save page but no Form variables are being passed. They're totally blank. Now I'm using a Form method=post and I'm using the request("myvariable") and I'm just having it write out the variable on the page to see if I get any data and nothing is there. Don't know what I'm doing wrong. Just to let you know, this is a recordset with information. So some parts of the form is prefilled. If they want to change something, they can. I moved all the recordset variables to vbscript variables so it doesn't affect the database (obviously). Anyway, here's some of the code:

Code:
<body bgColor="white" onload="showTab(0);">
<p>    <img src="Images/Bureau%20Logo2.png" alt="Bureau Logo" width="519" height="108" hspace="130" align="absmiddle"></p>
<p>
<%response.write("<form method=Post action=""/doecgp/verifydoecit.asp"" name=doecit>")%>
<table border="1px" cellpadding="5" cellspacing="1" bgcolor="#F7F6F3" bordercolor="#E6E2D8">
  <tr>
    <td bgcolor="#5D7B9D"><span class="style5">Contract Num</span></td>
  <% While ((Repeat1__numRows <> 0) AND (NOT Recordset1.EOF))
  dim strcontractnum 
  strcontractnum = trim(Recordset1.Fields.Item("Contract Num").Value)
  Session("ContractNum") = trim(Recordset1.Fields.Item("Contract Num").Value)
  response.write("<td class=""style7""><span class=""style6""><input type=text name=Contract_Num size=5 maxlength=5 disabled=true border=1 style=background-color:#ccccc tabindex=""1"" value=")
  response.write ("'")
  response.write strcontractnum
  response.write ("'")
  response.write("></span></td>")
  %>
  </tr>
<% 
dim strcurrency
dim strvrnum
dim strstatus
dim strfiscalyr
dim strbegindate
dim strenddate
dim strofficeid
dim intnumcopies
dim strdbs
dim strreviewer
dim strEO
dim strNotes
dim strGrantNo
dim strDescription
dim strvendorid
dim strvendorname
dim strvendaddr1
dim strvendaddr2
dim strcity
dim strstate
dim strzip
dim strdaterec
dim strlegalappr
dim strcappr
dim strvendorexe
dim stroutcorrect
dim strtocfo
dim strincorrect
dim strcfoappr
dim strbudgetappr
dim strtocommis
dim strdirectorappr
dim strcommisappr
dim strcomptappr
dim strdistributed
dim strjustread
dim strriskassess
dim strmbe
dim intriskscore
dim strmethodproc
dim strrisklevel
dim strstcnum
dim strservices
dim strcfda
dim strcfa
dim strcontractmgr
dim strcontractmgrid
dim strvenrec
dim strcontractphone
dim strcontractemail
dim strmethpay
dim struserid
dim strservtype
dim strlastupdate
dim x
dim stroption
dim intcontractdays
dim intdeptdays
dim inttotalamt
dim intamounts
dim strtotalamt

stroption = "option"
strvrnum = trim(Recordset1("VR Contract Num"))
strstatus = trim(Recordset1("Status"))
if isnull(Recordset1("Original Contract Amt"))= true then
    strcurrency = 0
    strcurrency = formatcurrency(strcurrency,2)
else
    strcurrency = formatcurrency(Recordset1("Original Contract Amt"),2)
end if
inttotalamt = strcurrency
Set Recordset7 = Server.CreateObject("ADODB.Recordset")
Recordset7.ActiveConnection = MM_Prod_Contract_Information_STRING
Recordset7.Source = "SELECT *  FROM contractinfo.[Contract Admendments2] where [Contract No] = N'" & strcontractnum & "'" & "order by [Contract Key]"
Recordset7.CursorType = 0
Recordset7.CursorLocation = 3
Recordset7.LockType = 1
Recordset7.Open()
     While (Not Recordset7.EOF)
    if isnull(Recordset7("Amt 1")) = false then
        inttotalamt = inttotalamt + Recordset7("Amt 1")
    end if
    Recordset7.MoveNext
     Wend
Recordset7.Close()
Set Recordset7 = Nothing
Set Recordset8 = Server.CreateObject("ADODB.Recordset")
Recordset8.ActiveConnection = MM_Prod_Contract_Information_STRING
Recordset8.Source = "SELECT *  FROM contractinfo.[Contract Extensions] where [Contract No] = N'" & strcontractnum & "'" & "order by [Seq No]"
Recordset8.CursorType = 0
Recordset8.CursorLocation = 3
Recordset8.LockType = 1
Recordset8.Open()
     While (Not Recordset8.EOF)
    if isnull(Recordset8("Amt - 1")) = false then
    inttotalamt = inttotalamt + Recordset8("Amt - 1")
    end if
    Recordset8.MoveNext
     Wend
Recordset8.Close()
Set Recordset8 = Nothing
Set Recordset9 = Server.CreateObject("ADODB.Recordset")
Recordset9.ActiveConnection = MM_Prod_Contract_Information_STRING
Recordset9.Source = "SELECT *  FROM contractinfo.[Contract Renewals] where [Contract No] = N'" & strcontractnum & "'" & "order by [Seq Num]"
Recordset9.CursorType = 0
Recordset9.CursorLocation = 3
Recordset9.LockType = 1
Recordset9.Open()
    While (Not Recordset9.EOF)
    if isnull(Recordset9("Amt 1")) = false then
    inttotalamt = inttotalamt + Recordset9("Amt 1")
    end if
    Recordset9.MoveNext
     Wend
Recordset9.Close()
Set Recordset9 = Nothing
if isnull(inttotalamt) = true then
    strtotalamt = 0
    strtotalamt = formatcurrency(strtotalamt,2)
else
    strtotalamt = formatcurrency(inttotalamt,2)
end if
strfiscalyr = trim(Recordset1("Fiscal Year"))
strofficeid = trim(recordset1("Office ID"))
strdbs = trim(recordset1("DBS"))
if isnull(Recordset1("End date")) = true then
strenddate = ""
else
strenddate = right("0" & month(Recordset1("End date")),2) & "/" & right("0" & day(Recordset1("End date")),2) & "/" & year(Recordset1("End date"))
end if
intcopies = trim(Recordset1("Num Copies"))
strreviewer = trim(Recordset1("Reviewer"))
strEO = trim(Recordset1("EO"))
strNotes = trim(Recordset1("Notes"))
strGrantNo = trim(Recordset1("Grant No"))
strvendorid = trim(Recordset1("Ven ID"))
strvendorname = trim(Recordset1("Vendor Name"))
strvendaddr1 = trim(Recordset1("Ven St Addr1"))
strvendaddr2 = trim(Recordset1("Ven St Addr2"))
strcity = trim(Recordset1("City"))
strstate = trim(Recordset1("State"))
strzip = trim(Recordset1("Zip"))
strcontractmgrid = trim(Recordset1("Contract Mgr ID"))
strcontractmgr = trim(Recordset1("Contract Mgr"))
strcontractphone = trim(Recordset1("Contract Mgr Phone"))
strcontractemail = trim(Recordset1("Contract Mgr E-mail"))
strvenrec = trim(Recordset1("Ven-Rec"))
if isnull(Recordset1("Date Rec")) = true then
strdaterec = ""
else
strdaterec = right("0" & month(Recordset1("Date Rec")),2) & "/" & right("0" & day(Recordset1("Date Rec")),2) & "/" & year(Recordset1("Date Rec"))
end if
if isnull(Recordset1("Legal Appr")) = true then
strlegalappr = ""
else
strlegalappr = right("0" & month(Recordset1("Legal Appr")),2) & "/" & right("0" & day(Recordset1("Legal Appr")),2) & "/" & year(Recordset1("Legal Appr"))
end if
if isnull(Recordset1("CA Appr")) = true then
strcaappr = ""
else
strcaappr = right("0" & month(Recordset1("CA Appr")),2) & "/" & right("0" & day(Recordset1("CA Appr")),2) & "/" & year(Recordset1("CA Appr"))
end if
if isnull(Recordset1("Vendor Exe")) = true then
strvendorexe = ""
else
strvendorexe = right("0" & month(Recordset1("Vendor Exe")),2) & "/" & right("0" & day(Recordset1("Vendor Exe")),2) & "/" & year(Recordset1("Vendor Exe"))
end if
if isnull(Recordset1("Out Correct")) = true then
stroutcorrect = ""
else
stroutcorrect = right("0" & month(Recordset1("Out Correct")),2) & "/" & right("0" & day(Recordset1("Out Correct")),2) & "/" & year(Recordset1("Out Correct"))
end if
if isnull(Recordset1("To CFO")) = true then
strtocfo = ""
else
strtocfo = right("0" & month(Recordset1("To CFO")),2) & "/" & right("0" & day(Recordset1("To CFO")),2) & "/" & year(Recordset1("To CFO"))
end if
if isnull(Recordset1("Begin date")) = true then
strbegindate = ""
else
'strbegindate = formatdatetime(Recordset1("Begin date"),vbshortdate)
strbegindate =  right("0" & month(Recordset1("Begin date")),2) & "/" & right("0" & day(Recordset1("Begin date")),2) & "/" & year(Recordset1("Begin date"))
end if
if isnull(Recordset1("In Correct")) = true then
strincorrect = ""
else
strincorrect = right("0" & month(Recordset1("In Correct")),2) & "/" & right("0" & day(Recordset1("In Correct")),2) & "/" & year(Recordset1("In Correct"))
end if
if isnull(Recordset1("CFO Appr")) = true then
strcfoappr = ""
else
strcfoappr = right("0" & month(Recordset1("CFO Appr")),2) & "/" & right("0" & day(Recordset1("CFO Appr")),2) & "/" & year(Recordset1("CFO Appr"))
end if
if isnull(Recordset1("Budget Appr")) = true then
strbudgetappr = ""
else
strbudgetappr = right("0" & month(Recordset1("Budget Appr")),2) & "/" & right("0" & day(Recordset1("Budget Appr")),2) & "/" & year(Recordset1("Budget Appr"))
end if
if isnull(Recordset1("To Commis")) = true then
strtocommis = ""
else
strtocommis = right("0" & month(Recordset1("To Commis")),2) & "/" & right("0" & day(Recordset1("To Commis")),2) & "/" & year(Recordset1("To Commis"))
end if
if isnull(Recordset1("Director Appr")) = true then
strdirectorappr = ""
else
strdirectorappr = right("0" & month(Recordset1("Director Appr")),2) & "/" & right("0" & day(Recordset1("Director Appr")),2) & "/" & year(Recordset1("Director Appr"))
end if
if isnull(Recordset1("Commis Appr")) = true then
strcommisappr = ""
else
strcommisappr = right("0" & month(Recordset1("Commis Appr")),2) & "/" & right("0" & day(Recordset1("Commis Appr")),2) & "/" & year(Recordset1("Commis Appr"))
end if
if isnull(Recordset1("Compt Appr")) = true then
strcomptappr = ""
else
strcomptappr = right("0" & month(Recordset1("Compt Appr")),2) & "/" & right("0" & day(Recordset1("Compt Appr")),2) & "/" & year(Recordset1("Compt Appr"))
end if
if isnull(Recordset1("Distributed")) = true then
strdistributed = ""
else
strdistributed = right("0" & month(Recordset1("Distributed")),2) & "/" & right("0" & day(Recordset1("Distributed")),2) & "/" & year(Recordset1("Distributed"))
end if
if strcaapr = "" or strdaterec = "" then
    intdeptdays = 0
else
    intdeptdays = datediff("d",strdaterec,strcaappr)
end if
if strcommisappr = "" or strdaterec = "" then
    intcontractdays = 0 
else
    intcontractdays = datediff("d",strdaterec,strcommisappr)
end if
strjustread = trim(Recordset1("Just Read"))
strriskassess = trim(Recordset1("Risk Assess"))
strmbe = trim(Recordset1("MBE"))
intriskscore = trim(Recordset1("Risk Score"))
strmethodproc = trim(Recordset1("Method Proc"))
strrisklevel = trim(Recordset1("Risk Level"))
strstcnum = trim(Recordset1("STC Num"))
strservices = trim(Recordset1("Services"))
strcfda = trim(Recordset1("CFDA"))
strcsfa = trim(Recordset1("CSFA"))
strmethpay = trim(Recordset1("Method of Pmt"))
struserid = trim(Recordset1("UserID"))
strservicetype = trim(Recordset1("Service Type"))
if isnull(Recordset1("Last Update")) = true then
    strlastupdate = ""
else
    strlastupdate = right("0" & month(Recordset1("Last Update")),2) & "/" & right("0" & day(Recordset1("Last Update")),2) & "/" & year(Recordset1("Last Update"))
end if

  Repeat1__index=Repeat1__index+1
  Repeat1__numRows=Repeat1__numRows-1
  Recordset1.MoveNext()
Wend
%>
</table>
<p></p>
<%
drawTabs

startContentSection

startTabContent(1)
response.write("<table cellspacing=1 cellpadding=1>" & chr(13))
response.write("<tr valign=baseline>")
response.write("<td><td>")
response.write("<td align=left>VR Contract Num:")
response.write ("</td>")
response.write (" <td><input type=text name=VR_Contract_Num size=6 maxlength=6 disabled=true border=1 style=background-color:#ccccc tabindex=""2"" value=")
response.write ("'")
response.write strvrnum
response.write ("'")
response.write ("></td>")
response.write ("<td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>")
response.write("<td align=left>Status:")
response.write ("</td>")
response.write (" <td><select name=Status size=1 tabindex=7 disabled=true>")
if isnull(strstatus) or isempty(strstatus) then 
    response.write ("<option value=nothing selected=""selected""></option>")
else
    response.write ("<option value=nothing></option>")
end if
if strstatus = "Active" then
    response.write ("<option value=Active selected=""selected"">Active</option>")
else
    response.write ("<option value=Active>Active</option>")
end if
If strstatus = "Processing" then
    response.write ("<option value=Processing selected=""selected"">Processing</option>")
else
    response.write ("<option value=Processing>Processing</option>")
end if
if strstatus = "Inactive" then
    response.write ("<option value=Inactive selected=""selected"">Inactive</option>")
else
    response.write ("<option value=Inactive>Inactive</option>")
end if
response.write ("</select></td>")
response.write("    </tr>" & chr(13))
response.write("    <tr>" & chr(13))
response.write("<td><td>")
response.write("<td align=left>Original Contract Amt:")
response.write ("</td>")
response.write (" <td><input type=text name=Original_Contract_Amt size=15 maxlength=15 disabled=true border=1 style=background-color:#ccccc tabindex=""3"" onKeyPress=""return(currencyFormat(this,',','.',event))"" value=")
response.write strcurrency
response.write ("></td>")
response.write ("<td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>")
response.write("<td align=left>Fiscal Year:")
response.write ("</td>")
response.write (" <td><select name=Fiscal_year size=1 tabindex=8 disabled=true>")
if isnull(strfiscalyr) or isempty(strfiscalyr) then
    response.write ("<option value=Nothing selected=selected></option>")
else
    response.write("<option value=Nothing></option>")
end if
if strfiscalyr = "04/05" then
    response.write ("<option value=Active selected=selected>04/05</option>")
else
    response.write ("<option value=Active>04/05</option>")
end if
if strfiscalyr = "05/06" then
    response.write ("<option value=Processing selected=selected>05/06</option>")
else
    response.write ("<option value=Processing>05/06</option>")
end if
if strfiscalyr = "06/07" then
    response.write ("<option value=Inactive selected=selected>06/07</option>")
else
    response.write ("<option value=Inactive>06/07</option>")
end if
if strfiscalyr = "07/08" then
    response.write ("<option value=Inactive selected=selected>07/08</option>")
else
    response.write ("<option value=Inactive>07/08</option>")
end if
if strfiscalyr = "08/09" then
    response.write ("<option value=Inactive selected=selected>08/09</option>")
else
    response.write ("<option value=Inactive>08/09</option>")
end if
response.write ("</select></td>")
response.write("    </tr>" & chr(13))
response.write("    <tr>" & chr(13))
response.write("<td><td>")
response.write("<td align=left>Total Contract Amt:")
response.write ("</td>")
response.write (" <td><input type=text name=Total_Contract_Amt size=15 maxlength=15 disabled=true border=1 style=background-color:#ccccc value=")
response.write ("'")
response.write strtotalamt
response.write ("'")
response.write ("></td>")
response.write ("<td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>")
response.write("<td align=left>Begin Date:")
response.write ("</td>")
response.write (" <td><input type=text name=Begin_Date size=15 maxlength=15 disabled=true border=1 tabindex=9 style=background-color:#ccccc onFocus=""vDateType='1'"" onKeyUp=""DateFormat(this,this.value,event,false,'1')"" onBlur=""DateFormat(this,this.value,event,true,'1')"" value=")
response.write ("'")
response.write strbegindate
response.write ("'")
response.write ("></td>")
response.write("    </tr>" & chr(13))
response.write("    <tr>" & chr(13))
response.write("<td><td>")
response.write("<td align=left>Office ID:")
response.write ("</td>")
response.write (" <td><input type=text name=Office_ID size=20 maxlength=50 disabled=true border=1 tabindex=4 style=background-color:#ccccc tabindex=""4"" value=")
response.write ("'")
response.write strofficeid
response.write ("'")
response.write ("></td>")
response.write ("<td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>")
response.write("<td align=left>End Date:")
response.write ("</td>")
response.write (" <td><input type=text name=End_Date size=15 maxlength=15 disabled=true border=1 tabindex=10 style=background-color:#ccccc onFocus=""vDateType='1'"" onKeyUp=""DateFormat(this,this.value,event,false,'1')"" onBlur=""DateFormat(this,this.value,event,true,'1')"" value=")
response.write ("'")
response.write strenddate
response.write ("'")
response.write ("></td>")
response.write("    </tr>" & chr(13))
response.write("    <tr>" & chr(13))
response.write("<td><td>")
response.write("<td align=left>Number of Copies:")
response.write ("</td>")
response.write (" <td><input type=text name=Num_Copies size=4 maxlength=4 disabled=true border=1 tabindex=4 style=background-color:#ccccc value=")
response.write ("'")
response.write intnumcopies
response.write ("'")
response.write ("></td>")
response.write ("<td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>")
response.write("<td align=left>DBS:")
response.write ("</td>")
response.write (" <td><select name=DBS size=1 tabindex=11 disabled=true>")
Dim Recordset2
Dim Recordset2_numRows

Set Recordset2 = Server.CreateObject("ADODB.Recordset")
Recordset2.ActiveConnection = MM_Prod_Contract_Information_STRING
Recordset2.Source = "SELECT *  FROM dbo.[DOE Orgs]"
Recordset2.CursorType = 0
Recordset2.CursorLocation = 2
Recordset2.LockType = 1
Recordset2.Open()

if isnull(strdbs) or isempty(strdbs) then
    response.write ("option value=nothing selected=selected></option>")
else
    response.write ("option value=nothing></option>")
end if
While NOT Recordset2.EOF
Recordset2_numRows = trim(Recordset2.Fields.Item("DBS").Value)
if strdbs = Recordset2_numRows then
    response.write ("<option value=")
    response.write Recordset2_numRows
    response.write (" selected=selected>")
    response.write Recordset2_numRows
    response.write ("</option>")
else
    response.write ("<option value=")
    response.write Recordset2_numRows
    response.write (">")
    response.write Recordset2_numRows
    response.write ("</option>")
end if
recordset2.movenext()
wend
Recordset2.Close()
Set Recordset2 = Nothing

response.write strdbs
response.write ("</select></td>")
response.write("    </tr>" & chr(13))
response.write("    <tr>" & chr(13))
response.write("<td><td>")
response.write("<td align=left>Reviewer:")
response.write ("</td>")
response.write (" <td><input type=text name=Reviewer size=3 maxlength=3 disabled=true border=1 tabindex=5 style=background-color:#ccccc value=")
response.write ("'")
response.write strreviewer
response.write ("'")
response.write ("></td>")
response.write ("<td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>")
response.write("<td align=left>EO:")
response.write ("</td>")
response.write (" <td><input type=text name=EO size=15 maxlength=50 disabled=true border=1 tabindex=12 style=background-color:#ccccc value=")
response.write ("'")
response.write strEO
response.write ("'")
response.write ("></td>")
response.write("    </tr>" & chr(13))
response.write("    <tr valign=top>" & chr(13))
response.write("<td><td>")
response.write("<td align=left>Notes:")
response.write ("</td>")
response.write (" <td><textarea rows=4 cols=25 name=Notes tabindex=6 disabled=true border=1>")
response.write strNotes
response.write ("</textarea></td>")
response.write ("<td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>")
response.write("<td align=left><p>Grant Number: &nbsp;&nbsp;")
response.write("<br></br><br>Description:")
response.write ("</p></td>")
response.write (" <td align=left><p><input type=text name=Grant_No size=15 maxlength=15 disabled=true border=1 tabindex=13 style=background-color:#ccccc value=")
response.write ("'")
response.write strGrantNo
response.write ("'")
response.write ("</br><br><textarea rows=3 cols=25 name=Description disabled=true border=1 onBlur=""nexttab('description')"" tabindex=14>")
response.write strDescription
response.write ("</textarea></br></p></td>")
response.write("    </tr>" & chr(13))
 response.write(" <tr>" & chr(13))
 response.write("<td><td>")
 response.write("<td>")
 response.write("</td>")
 response.write("</tr>")
 response.write(" <tr>" & chr(13))
 response.write("<td><td>")
 response.write("<td>")
 response.write("</td>")
 response.write("</tr>")
 response.write(" <tr>" & chr(13))
 response.write("<td><td>")
 response.write("<td>")
 response.write("</td>")
 response.write("</tr>")
 response.write(" <tr>" & chr(13))
 response.write("<td><td>")
 response.write("<td>")
 response.write("</td>")
 if Session("Permissions") = "View" then
     response.write("  <td align=right><input name=""EditButton"" type=""button"" value=""Edit"" disabled=""true;""></td>")
     response.write("  <td align=center><input name=""SaveButton"" type=""submit"" value=""Save"" disabled=""true;""></td>")
      response.write("  <td align=left><input name=""CancelButton"" type=""button"" value=""Cancel"" disabled=""true;""></td>")
else
     response.write("  <td align=right><input name=""EditButton"" type=""button"" value=""Edit"" onclick=""javascript:disable(true);document.doecit.VR_Contract_Num.select();document.doecit.VR_Contract_Num.focus()""></td>")
     response.write("  <td align=center><input name=""SaveButton"" type=""submit"" value=""Save"" disabled=""true"" onclick=""javascript:disable(false);document.doecit.submit();""></td>")
     response.write("  <td align=left><input name=""CancelButton"" type=""button"" value=""Cancel"" disabled=""true"" onclick=""window.location.reload(true);javascript:disable(false);""></td>")
end if
 response.write("<td></td>")
 response.write(" </tr>" & chr(13))
 response.write(" <tr>" & chr(13))
 response.write("<td><td>")
 response.write("<td>")
 response.write("</td>")
 response.write("</tr>")
 response.write("</table>" & chr(13))
endTabContent
 
I could be wrong but I'm not seeing a closing </form> tag.
 
Values will not be passed from disabled form elements.

To see what is really coming in the post you could add some debug code like this:
[tt]
For Each Thing In Request.Form
Response.Write Thing & "=" & _
Request.Form(Thing) _
& "<BR>" & vbCrLf
Next
[/tt]
 
Thanks Sheco. That helps me alot! I didn't know you couldn't pass anything from disabled form elements! Now I gotta figure something else out. Thanks!
 
Got another question. I make the disable false via javascript. So that means it still won't pass the values?
 
If you know that all of your users will have javascript enabled browsers.... you could call a javascript function in your HTML form's onSubmit event... and that function could enable everything.

..or if you already have a form validation function that is called by onSubmit then you could add the code to enable the form elements to the bottom of the function, so that they are only enabled if the validation has success.
 
I found my problem. I disabled all my fields before I send them on the submit so I'll have to change that. It was evil that we can't pass disabled fields in Request.Form. Wish they'd make it known. Thanks!
 
If you just need the sums from some of them, it would be more efficient to ask the server to provide that data, rather than dumping all the data from your server then adding it together in a loop, for instance:
Code:
SELECT SUM([Add 1]) as SUM1 FROM contractinfo.[Contract Admendments2] where [Contract No] = N'" & strcontractnum & "'"
Depending on the database your using you might be able to do all three of those statements in one string using a UNION or inner selects.
Usually SELECT *'s are inefficient, especially if you only need a single field. A SELECT * forces you to pull down all of the field data even if you only need one field. That means extra communication time between your web server and the database andthen extra memory and resource usage on the webserver to create all of the objects to encapsulate that data (Recordset, fields, etc) and of course the memory cost of actually holding the data.

Also, you could move a lot of that code out of Response.Write's and into an HTML block. It would be easier to read as well as a little more efficient. For Instance:
Code:
<%
drawTabs

startContentSection

startTabContent(1)
%>
<table cellspacing=1 cellpadding=1>
   <tr valign=baseline>
      <td><[highlight]/[/highlight]td>
      <td align=left>VR Contract Num:</td>
      <td>
         <input type=text name=VR_Contract_Num size=6 maxlength=6 disabled=true border=1 style=background-color:#ccccc tabindex="2" value="<%=strvrnum%>">
      </td>
Also, I noticed the error above (highlighted) was a little easier to notice once I started spacing it out.


Anyways, just wanted to give you some advice on your code layout and execution
-T

barcode_1.gif
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top