Passing A Querystring Variable Through A POST Form
I am passing a value to a form through the URL as follows:
<A href="http://www.xxxxxx.com/orderone.asp?text="radius">http://www.xxxxxx.com/orderone.asp?text="radius"
On the orderone.asp page, I am reading the value into a text box as follows:
<input name="Template" type="text" id="Template" size="25" maxlength="255" class="body" value=<% = request.querystring("Text") %>
so far it works fine. It shows the value in the text box on the page. I am trying to post this page with all the form fields to a new page that emails all the variables that are on this page. The form tag looks like
<form action="Orderform3.asp" method="post" name="order">
In orderform3.asp, i am requesting the values for all the form fields as follows before emailing all the fields to myself:
strBody = strBody & Request.Form("Account_Name") 'strbody is the variable that adds all the form fields to the body of the email
strBody = strBody & vbCrLf
strBody = strBody & Request.Form("Contact_Name")
strBody = strBody & vbCrLf
strBody = strBody & Request.Form("Template")
Here is the problem...I am getting the email with the values filled in except for "Template" and I cannot figure out why. Is there something that I am doing wrong? i have to mention that there is no DB behind this site...it is just a static web site with an email script in it.
View Replies
ADVERTISEMENT
i have a table 'Accounts' in my database, which contains a bunch of
users. From the main menu i choose "edit user" and all users in the db
are presented in a table. The first column 'Pnr' is a unique ID for
each user that i made appear as a link. clicking on one userID should
present a form where the picked users userdata is already filled in so
i can easily edit it and then move on to submit the form to update the
db. i get to the part where all users are listed nicely in a table,
but clicking on one, i get this error:
Error Type:
ADODB.Recordset (0x800A0CC1)
Item cannot be found in the collection corresponding to the requested
name or ordinal.
/VS_Files/updateUserForm.asp, line 19
I think i'm doing something wrong with passing a value with the
querystring...? Code:
View Replies
View Related
I have IIS server installed on XP-pro. I also have Norton Internet
Security installed.
I can run simple ASP programs without any problem. But when I use forms
with post method and call an asp in action, it does not pass any data
to ASP.
Request.Form method on a form field does not return any value.
This code works on web hosting provider server, just does not work on
my workstation with my own IIS server. Code:
View Replies
View Related
I am posting a form variable to an ASP script, but when the asp script receives the variable, I don't want it to open a new web page or open in the same window. I also can't have the script on the same page and refresh the page.
I use javascript to submit the form with the hidden field, and I want the variable to be processed by the asp script in the background on the server and return nothing. So essentially, i want the script to run transparently. How can I do this with asp? We run a classic environment.
I am doing this because the script is a tracking script, and it's disruptive for the user to see any trace of it. I want them to continue surfing as normal.
View Replies
View Related
I have a form that you enter in a file path i.e c:folder1
you then click search and the application will search for that folder and check if it exists if so it will return a list of files in that folder. you are alowed to select what files you want to copie and then enter in the folder you want to copie them to.
here is my issues: i enter in my folder to search on and it is good I get a list of files in that folder I am also given the the folder path at the top of my table. in the code I have also created a hidden field so that when I click on my copy button my from folder path is sent over to that I can us it in my objFile.CopyFile.
NOW Here is where I go *WTF* at the top of my page I am printing out my folder path vartiable and it is right. however once i press that copy button the folder name gets cut off at the space i.e E:flkfkdlsdkklfile2 inforil....
so how do I fix this here is my code I have tryed to highlight the partst pertaing to this issue. Code:
View Replies
View Related
how do I pass a table name in an ASP select stt. as a form variable.
e.g from server side script
Select * from (response.form(group))
View Replies
View Related
I have a Function in VB Script that generates a signature. I assign the result to a variable and then need to do a hidden post to an ASP Page for further processing.
Basic functionality is I have a button upon pressing it -- It does the hidden post.
Code looks like this. Please assist with passing this stringToSign variable to the .asp page via hidden post. Code:
View Replies
View Related
I have a page that calls itself using a form. The form has two select elements. In the sql statement I am attempting to match the values of the select element to populate a recordset.
The two fields in teh Access db are of type Text and of type Integer. What baffles me is that one sql statement works fine and the other returns nothing. I am having the issue matching on the bedrooms.
In the first statement I took out all other doo-doo and just matched bedrooms = request("bedrooms"). On the other one I used p.bedrooms but it keeps turning up empty. Code:
View Replies
View Related
The subject sounds confusing but here is what i want to do. I have a
button on my page which says
OnClick="javascript:window.open('reportsContainer.asp?pag eURL=Report1.asp?intCurrentPage=1&blnRetrieveFlag=1&Show=1',TasksRPT');"
Now on the Conatiner.asp what i do is
if Request.QueryString("Show") = 1 then
pageURL = Request.QueryString("pageURL")
end if
And then i set the pageURL along with intCurrentPage and
blnRetrieveFlag parameters to my fram src as
<frame height=500 scrolling=auto name="pageFrame" id="pageFrame"
border=0 src="<%=pageURL%>">
Code:
View Replies
View Related
I'm trying to create a link (SEE LINK BELOW) to a pop-up window. My problem is my sTargetPage variable is a url containing a querystring variable. When myPopUp.asp opens and I get my sPage query string value, it returns myTargetpage.asp?qs=1 and clips the 2nd querystring value pair.
Can someone help me construct a link so myPopUp.asp preserves the entire query string? I tried using the Server.HtmlEncode comand in "FAILED ATTEMPT" below, but I'm still losing any querystring pairs after the 1st qs pair.
PAGE VARIABLE: sTargetPage="myTargetpage.asp?qs=1&qs=2"
LINK: http://www.cnn.com/myPopUp.asp?sPage=" & sTargetPage
FAILED ATTEMPT: myPopUp.asp?sPage=" & Server.HtmlEncode(sTargetPage)
View Replies
View Related
I am passing
a value held in a session variable on a url. It works fine locally
testing but when I put it on the main web server the value disappears.
Nothing fancy here, real simple...what I am missing ?
<a href="http://ServerName/ReportServer?/SomeRpts/rpt1&urid=<%=
Session("txtURID") %>"
target="blank">Contracts - Client Listing</a>
View Replies
View Related
I am new to ASP.NET 2.0 and I am developing a small application which
originally consists of 2 pages. The first page displays a GridView Control
loaded with data from a sqlDataSouce. Such a GridView has a field that is a
hyperlink to the second page which is supposed to display the detail of the
record.
What I want to do is to send a QueryString Parameter to the second
page with the key to retrieve the record selected and show the information in
detail (a long description, a picture of a product, comments, price, etc.).
I have not written a single line of code (code-behind) for the first page.
How can I get the second page and send the querystring parameter?
View Replies
View Related
My problem is I'm paginating database results into a table, and each page takes the sql statement from the querystring, however because i use LIKE %...% the '%' get ignored and I get an error. For example the sql in the querystring is..
SELECT * FROM posters WHERE poster_name LIKE '%a%' AND poster_file IS NOT NULL ORDER BY poster_name ASC;
But when it's extracted from the querystring it is this:
SELECT * FROM posters WHERE poster_name LIKE 'a' AND poster_file IS NOT NULL ORDER BY poster_name ASC;
So i get an error because the wildcards have been removed. Any way around this?
View Replies
View Related
I,am passing form variable monthsenrolled as a query string It does not work as i get a error what is wrong here
function previous(){
window.open("http://localhost/college/basic.asp?status=2&test=<%Request.form("MonthsEnrolled")%>");
}
View Replies
View Related
Is this possible? I have a 2-dimensional dynamic array that I want to pass to a page. If so, what is the syntax?
View Replies
View Related
is there any way of passing a javascript variable over to a asp variable so
i can write it to my database.
View Replies
View Related
I am passing a sql string thru my querystring for the next page to
capture.
example: www.xxxxxxxx.com/index.asp?str=select * from table where name
like '%doe%'
Passing a basic string works fine. But, when I use the LIKE statement it
does not work. I know it's because of the % sign, so how do I translate
this thru, so that the following page picks up the percent sign?
View Replies
View Related
I'm posting a form from a php page to a page that's asp. I want the url parameters sent to the asp page to be the defaults of the form. I've never used asp so I'm not sure how to do this.For example:
www.test.com/test.asp?clientid=123
Text field in asp/javascript form called "client" should now default to "123".
In php I would have put this as the default value for the "client" field in the form: <?php $_GET['clientid']; ?>
What would be the equivalent way of doing it for asp?
View Replies
View Related
I have page1.asp with a form on it, then this goes to Page2.asp, the data is processed. I then want to access the same from data on page3.asp. Is there any simple way to transfer all POST requests to page3.asp without having to put them into session or Query-strings?
View Replies
View Related
Is there a server variable that returns the query string part of a url?
Below gets my page, but i need to capture what comes after ".asp"
Request.ServerVariables("URL")
returns
/mywebpage.asp
View Replies
View Related
I having trouble with this action cause I want the user to be able to use the back button and the submitted data should be still in their form. So I the user send invalid data he can back browse and change the invalid data. I use method=POST cause its a lot of data i send between pages + client is IE6 ...
View Replies
View Related
I'm trying to pass the wildcard variable % to another page via
request.querystring.
When I go to pick up the variable through request.querystring, it will
never diplay the "%" if one is included. It will diplay any other
characters included in the variable though.
Code from page 1:
<%response.write "<a href='Page_2.asp?Severity=" & varCombo_Severity &
"&Owner=" & varCombo_Owner & "'>" & "<i> Go to Page 2 </i>" & "</a>"
%>
Code from page 2:
<%varCombo_Severity = Request.Querystring ("Severity")%>
<%varCombo_Owner = Request.Querystring ("Owner")%>
Result: No % wildcards are passed though to page 2
Any ideas?
View Replies
View Related
activelang=Request.QueryString("lang")
.
some code
.
Response.Write " <!--#include virtual='/SIFS/" & activelang & "/welcome.txt' -->"
activelang=Request.QueryString("lang")
.
some code
.
<!--#include virtual='/SIFS/<%= activelang %>/welcome.txt' -->
Is there any trick will do the job ?
View Replies
View Related
I have a VB application sending data via post to an ASP page.
The application sends two variable: id, txt
If txt has the & sign in its string, it cause trouble. E.g.:
id = 1
txt = "Hello & more"
If I take a look into Request.Form() array in asp page, it shows the
following:
id = 1
txt = "Hello "
more = ""
View Replies
View Related
Can someone tell me the maximum character length of a variable passed to an ASP page via a POST form (i.e. not through the querystring)? I read somewhere that said it was 1024 characters but that can't be right.
View Replies
View Related
I am dumb, ya'll are smart. Help. I have a session variable I am using for login. I want to have a link on the page to logout which will re-post the page. I put in the following code:
<a href="../nav/nav.asp" target="NavFrame" onClick="<%session.Abandon()%>">Logout</a>
This would bring the user back to the same page, but would limit the options to read only user capabilities.
This works fine except for one thing. The session is abondaned any time the page is submitted. There are several other items on the page that call submit() that need to be used and the page not end the session. Any explanation why this is ending the session and how to avoid it?
View Replies
View Related
sending a variable in this way: temp.asp?num= <% = Var %> creates an error , although i can see in the url that the value is added (e.g temp.asp?num=3) is it because the method is post? what should i do so the variable will come throgh with no error!?
View Replies
View Related
I am trying to make a variable appear in an SQl but am not sure how. Here is the sample code:
View Replies
View Related
i try to passing variable using get method in a url.
this is my example url
headertext="PE&CCA"
<a href="addsection.asp?uid=<%=uid%>&sublvl=<%=sublvl%>&headertext=<%=headertext%>">add</a>
i did print out teh variable headertext at addsection.asp, what i get is from the variable headertext is PE, so what shd i out in the url to get PE&CCA in my addsection page?
View Replies
View Related
I have a PHP page with a form which captures some information about a user before then redirecting the user to a ASP driven website. Thing is, there is obviously nothing to stop the user from simply noting the URL of the site they have been redirected to, and then going direct to the site everytime after.
Is there a way I can make the homepage of the ASP page only open, if it has been passed a hidden variable (by _POST). I could probably do this if the referral site was in PHP, but I have no experience of ASP. I assume i will need to input a few lines of code at the beginning of the ASP homepage which look for the POST variable and only open the site if it has been passed from the PHP page?
View Replies
View Related
I'm building a site with news headlines on my index.asp page. I want these headlines to link to a file called story.asp. This page would contain the entire article. The data is coming out of Access.
Am I supposed to use a querystring to pass the storyID from the headlines on the index.asp to story.asp? Is there other/easier ways to this? I want to be clear in the direction I'm heading.
View Replies
View Related
Is it possible to pass the "text content" in a table to a variable.. here's my code
<table border="1" width="443" id="table1">
<tr>
<td><%response.write vFieldOperator%></td>
</tr>
</table>
you see i want to pass the content in that particular table to a variable..
View Replies
View Related
I am pulling info from a recordset and all the information is correct as I have tested it in Analyzer.
The recordset returns info inside a table. From that table, I select a few options then submit the form. During the submit it passes 6 parameter. Up to this point, everything is correct. My problem is that my last parameter is passing the ID and not the Manufacturer Name. Code:
View Replies
View Related