[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Request.Form returns empty

Posted on 2013-01-12
10
Medium Priority
?
962 Views
Last Modified: 2013-01-12
Hello Experts,

Can anyone give me any ideas why would Request.Form not return anything? All my control names are spelled correctly (I used copy/paste), but I cannot think of what could be the issue?

I have recently installed Visual Studio 2010 on my computer, could that be conflicting in any way? What else can I check?

Thank you,
0
Comment
Question by:APD_Toronto
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 4
10 Comments
 
LVL 84

Accepted Solution

by:
Dave Baldwin earned 1000 total points
ID: 38770659
You would have to show us your code for us to help you figure what is wrong.
0
 

Author Comment

by:APD_Toronto
ID: 38770716
tax1 returns empty at Respone.Wrie

<%@ Language=VBScript %>

<!-- #include file="../includes/common.asp" -->
<!-- #include file="../includes/checklogin.asp" -->
<!-- #include file="../includes/functions.asp" -->
<!-- #include file="../includes/AdminPageSetup.asp" -->

<%
	strAction = Injection(Request.QueryString("action"))

	If strAction = "save" Then
	
		'Request Prices
		
		
		'Request Taxes
		  
		  '***TAX 1***
		  
			strTaxName1 = (Request.Form("txtTaxName1"))
			strTaxRate1 = Injection(Request.Form("txtTaxRate1")) 
			
			If Injection(Request.Form("chkTaxActive1")) = "1" Then
			
				strTaxActive1 = True
			
			Else
			
				strTaxActive1 = False
			
			End If
		
		  '***TAX 2***
		  
			strTaxName2 = Injection(Request.Form("txtTaxName2"))
			strTaxRate2 = Injection(Request.Form("txtTaxRate2")) 
			
			If Injection(Request.Form("chkTaxActive2")) = "1" Then
			
				strTaxActive2 = True
			
			Else
			
				strTaxActive2 = False
			
			End If
			
		'***TAX 3***
		  
			strTaxName3 = Injection(Request.Form("txtTaxName3"))
			strTaxRate3 = Injection(Request.Form("txtTaxRate3")) 
			
			If Injection(Request.Form("chkTaxActive3")) = "1" Then
			
				strTaxActive3 = True
			
			Else
			
				strTaxActive3 = False
			
			End If
		
		Response.Write("tax1 =" & strTaxName1)
			
		'Call Save
	
	Else
		
		strMSG = "Your changes have been cancelled."
		
	End If

Open in new window

0
 
LVL 31

Expert Comment

by:Wayne Barron
ID: 38770720
As long as you have something like this, you should be good to go.
However, like Dave pointed out, if you do have code like this, then we will need to see and no more.

(Just copy and paste into a new file, name it Q_27993404.asp
And then run it.
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>

<body>
<%getSub = request.Form("Submit")
if request.Form("Submit")="Send Data" then
fname = request.Form("FName")
lname = request.Form("LName")
response.Write "You entered <strong>"&fname&" "&lname&"</strong> as your name"
end if
%>
<form action="Q_27993404.asp" method="post" name="Process">
<input type="text" name="FName" />
<input type="text" name="LName" />
<input type="submit" name="Submit" value="Send Data" />
</form>
</body>
</html>

Open in new window


Carrzkiss
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

Author Comment

by:APD_Toronto
ID: 38770723
My test is Li. 63

My HTML form is below, but could this be related as well: http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/ASP/Q_27993401.html

HTML
<%@ Language=VBScript %>

<!-- #include file="../includes/common.asp" -->
<!-- #include file="../includes/checklogin.asp" -->
<!-- #include file="../includes/functions.asp" -->
<!-- #include file="../includes/AdminPageSetup.asp" -->

<%
Call openDB
Set rs = Server.CreateObject("ADODB.Recordset")
With rs

	strSQL = "SELECT * FROM tblTaxes ORDER BY fldID ASC;"
	.Open strSQL, cnn
	
		.MoveFirst 'TAX1
		
			strTaxName1 = .Fields("fldName")
			strTaxRate1 = CDbl(.Fields("fldRate")) * 100
			strTaxActive1 = .Fields("fldActive")
			
		.MoveNext 'TAX2
		
			strTaxName2 = .Fields("fldName")
			strTaxRate2 = CDbl(.Fields("fldRate")) * 100
			strTaxActive2 = .Fields("fldActive")
	
		.MoveNext 'TAX3
		
			strTaxName3 = .Fields("fldName")
			strTaxRate3 = CDbl(.Fields("fldRate")) * 100
			strTaxActive3 = .Fields("fldActive")
	.Close
End With
Set rs = Nothing
Call closeDB
%>

<%Call getHeader%>
	
	<h1> <center> Prices & Taxes </center> </h1>

<form method="POST" action="changeRates-save.asp?action=save" name="frm" onSubmit="return validate();" enctype="multipart/form-data">

<center>

	

</center>
<b><i> *IMPORTANT: All above prices should be pre-tax and pre-promo, including pre-1111.</i></b>

<br> &nbsp;<br> &nbsp;

<center>

<table width="50%"> <!--REDUCE LATER-->
	
	<tr>
		<td width="25%"> &nbsp; </td>
		<td width="25%" bgcolor="#C0C0C0" align="center"> <b> Tax #1 </b> </td>
		<td width="25%" bgcolor="#C0C0C0" align="center"> <b> Tax #2 </b> </td>
		<td width="25%" bgcolor="#C0C0C0" align="center"> <b> Tax #3 </b> </td>
	</tr>
	
	<tr>
		<td> Name: </td>
		<td> <input type="text" size="5" name="txtTaxName1" id="txtTaxName1" value="<%=strTaxName1%>" /> </td>
		<td> <input type=text size=5 name="txtTaxName2" id="txtTaxName2" value="<%=strTaxName2%>"> </td>
		<td> <input type=text size=5 name="txtTaxName3" id="txtTaxName3" value="<%=strTaxName3%>"> </td>
	</tr>
	
	<tr>
		<td bgcolor="#C0C0C0"> Rate: </td>
		<td bgcolor="#C0C0C0"> <input type=text size=5 name="txtTaxRate1" id="txtTaxRate1" value="<%=strTaxRate1%>"> % </td> 
		<td bgcolor="#C0C0C0"> <input type=text size=5 name="txtTaxRate2" id="txtTaxRate2" value="<%=strTaxRate2%>"> % </td> 
		<td bgcolor="#C0C0C0"> <input type=text size=5 name="txtTaxRate3" id="txtTaxRate3" value="<%=strTaxRate3%>"> % </td> 
	</tr>
	
	<tr>
		<td> Active: </td>
		
		<td>
			<input type=checkbox name="chkTaxActive1" id="chkTaxActive1" value=1
				
				<%If CBool(strTaxActive1) Then Response.Write("checked")%> >
			
		</td>
		
		<td>
			<input type=checkbox name="chkTaxActive2" id="chkTaxActive2" value=1
				
				<%If CBool(strTaxActive2) Then Response.Write("checked")%> >
			
		</td>
		
		<td>
			<input type=checkbox name="chkTaxActive3" id="chkTaxActive3" value=1
				
				<%If CBool(strTaxActive3) Then Response.Write("checked")%> >
			
		</td>
	</tr>

<table>

</center>
<b><i> *IMPORTANT: Inactive (un-checked) tax rates will NOT be charged.</i></b>


<br> &nbsp;<br> &nbsp;
<center>

	<INPUT type="submit" value="Save Changes" id=submit1 name=submit1> &nbsp; &nbsp; 
	<INPUT type="button" value="Cancel Changes" onClick="cancelChanges();" id=button1 name=button1>

</center>
<br> &nbsp;<br> &nbsp;

</form>

<%Call getFooter%>

<script type="text/javascript">

function validate()
{

	alert ('is everything validated?');
	return true;
}

function cancelChanges()
{
	if (confirm("Are you sure you want to cancel these changes?")) 
	{
		self.location = "changeRates-save.asp?action=cancel";
	}
}

</script>

Open in new window

0
 
LVL 31

Assisted Solution

by:Wayne Barron
Wayne Barron earned 1000 total points
ID: 38770724
The best thing that I can suggest is that you try bit by bit.

Try the first field by itself.

make sure that it is going through on its own, and then move on from there.

Example:
strAction = Request.QueryString("action")
response.write strAction

See what happens, have it by itself,
0
 

Author Comment

by:APD_Toronto
ID: 38770729
strAction = Request.QueryString("action") works as i get
tax1 =
On my screen, meaning Li. 63 executes
0
 
LVL 31

Expert Comment

by:Wayne Barron
ID: 38770732
As for the JIT, I am not sure if it will have anything to do with it.
As I had Visual Studio 2010 installed back mid-last year, and did not experience any issues with my classic ASP projects.
0
 
LVL 31

Expert Comment

by:Wayne Barron
ID: 38770736
So you are saying the running the test works, and you get back a result.
If that is true, then try it with your header of the file, and then include the protection
strAction = Injection(Request.QueryString("action"))
And try it again.
You want to test everything, to make sure that it all passes.
Then you can start looking into your other code on that page, to see if something else is stopping it from going through.

p.s.
It seems we are posting on top of each others comments :)
0
 

Author Comment

by:APD_Toronto
ID: 38770738
I removed   enctype="multipart/form-data" and it worked.
0
 
LVL 31

Expert Comment

by:Wayne Barron
ID: 38770751
Sometimes it is the little things.
Do you know what you was using that for?
As it might be needed on something, however, you can place it elsewhere, besides where you initially had it at.

Glad you got it working.
Carrzkiss
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hello, all! I just recently started using Microsoft's IIS 7.5 within Windows 7, as I just downloaded and installed the 90 day trial of Windows 7. (Got to love Microsoft for allowing 90 days) The main reason for downloading and testing Windows 7 is t…
Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question