Changing A Form Variable
I know you can call a Form Variable in a VBscript using
Request.Form("FieldName") and make equal a local variable like:
str = Request.Form("FieldName")
Now if do this:
str = "This is the new value"
How do you make FieldName equal str. So In a sense I want this to happen
FieldName = str
I need this so that when FieldName gets posted to the DB the new value get
sent.
View Replies
ADVERTISEMENT
i have a login form on my site. if the user enters incorrect detaisl then the script will kick them back to the page they were viewing before submitting the login form (login box is on all pages) using: Code:
View Replies
View Related
How do you do it? I have a ASP variable defined at the top of the page but how do I change that variable to a javascript one?
View Replies
View Related
how I could change the value of a server variable when the user clicks a button. The asp page displays a report using server side vbscript, and I have added an 'export' button that will copy the report to a file. I need this button to change a boolean so that the page will re-run, writing the report to the file instead of the screen.
View Replies
View Related
I want a form to submit to a different page depending on what selection has been made in a dropdown option box. However something is going wrong my code looks as follows: Code:
View Replies
View Related
I have a form, where the user types their initals and it then returns some results. However, the Oracle database requires the initials to be in capitals, how can I convert the user input to upppercase?
View Replies
View Related
i recently finished a tutorial on cdonts and finished putting together the page and form etc. now ive been reading and it seems cdonts is being discontinued and cdosys is taking over. does this mean that my cdonts will not work and i have to trnasfer it to cdosys ?
how can i transfer it to cdosys ? or do i have to make a completely new mail script?
Code: ....
View Replies
View Related
On a heavily used page that pulls a lot of data from the SQL server and XMl files we would like to implement refresh of only one data grid control in order to improve performance.
Is there a way to refresh data grid control without (post back) reload of the hole page. Data refresh can be done on regular time intervals or on click on the button. Environment (ASP.NET and SQL Server 2000).
View Replies
View Related
I have a form that gets a filename from a db like so
<FORM METHOD="POST" encType="multipart/form-data" ACTION="pic_delete.asp">
<input type="hidden" name="File1" value="<%=rstemp("filename")%>">
<input type="hidden" name="ImageID" value="<%=rstemp("ImageID")%>">
<INPUT TYPE=SUBMIT NAME="cmdSubmit" VALUE="Delete" ></form>
when I submit I get the error message "File not found"
So a did a respnse write to write my filename and found it is now called 2006_Apr_19-83955.23.bin It seems to be the time as it changes each time I try and get the filename to write...
this is the code on my delete page
<%
Dim Upload
Dim FileName
Dim Folder
Set Upload = New clsUpload
FileName = Upload("File1").FileName
response.write "Here is the file " & FileName & " name <br>"
Folder = Server.MapPath("..country") & "" & strPathToSave
response.write "Here is the folder " & folder & " name"
Upload.DeleteFile Folder & FileName
'Upload("File1").SaveAs Folder & FileName
Set Upload = Nothing %>
The folder name comes out right, just the filename changes.
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
I need to loop through all submitted form fields and place them all into 1 variable but i have no idea how. Here's what I have so far:
for each item in request.form
myVariable = "formfieldname:" & item & "formfieldvalue:" & request(item)
next
response.write(myVariable)
The problem with that is that response.write(myVariable) only prints the last field in the form.
I know that if I move the response.write(myVariable) INSIDE of the loop it will print correctly but I am not trying to print the form fields BUT I AM TRYING to store them in ONE variable.
For example:
myVariable = formfield1name:formfield1value:formfield2name:formfield2value:formfield3name:f ormfield3value:ETC ETC
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
Can You Put A Variable In A Request.Form Object I'm looking to do something like this:
variable = Request.Form(RS("ID"))
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
This is ASP and JScript.
I request a form variable:
var sReviewID = formatUndefined(Request.Form("ReviewID"), "");
Response.Write ("sReviewID: " + sReviewID + "<br>");
Function formUndefined is: Code:
View Replies
View Related
I'm trying to grab a variable from a dropdown list and pass it to a paypal form, the problem is it's in two different forms.. Code:
View Replies
View Related
I'd like to do something similar to CFParam, but in ASP - basically, I have a form variable ("Type") which may or may not be passed from the referring page. Some referring pages have an input field called "Type", whilst others do not.
I'm actually a CF developer, but keen to learn ASP. My current code at the top of the script is : Code:
View Replies
View Related
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
View Related
<input type="hidden" name="date" value= (Date)>
When I use:
<% Response.Write (Date)%> if returns the date I want.
I need to enter it to this date value in my form. What is wrong with my code above? It should be obvious, but I can't figure it out....
View Replies
View Related
I have a dropdown that calls a javascript function onChange. One of the lines in the script is:
tmp = document.form1.familyID.options[document.form1.familyID.selectedIndex].value;
How do I change it to allow familyID to be a variable passed to the function?
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 form that on clicking of the Update button first updates
the specific record in the db, then Inserts if the vMemo field is not
empty. The problem that I'm having is that After updating if you hit
the [F5] key (refresh) it inserts another record ...
I have tried:
1. Clearing the vMemo field after the insert is done (vMemo = "")
2. Setting the value on the form for this field to ""
Neither of these are working. It's not displaying it on the screen
but it is holding it in memory (I guess). Any way to clear this out
after update/insert?
View Replies
View Related
I get a "data type mismatch error". I assume it is because this is a number, but I don't know what to change.
<%
dim cnStr
dim rcSet
dim frmSSN
dim sqlStr
'store form input into variables
frmSSN = Request.Form("SSN")
'create connection and recordset objects
Set cnStr = Server.CreateObject("ADODB.Connection")
Set rcSet = Server.CreateObject("ADODB.Recordset")
' defining database connection (connectionstring2.inc)
cnStr.ConnectionString = path
cnStr.Provider = provider
cnStr.open
%>
<%
SQL_query = "SELECT * FROM Orders WHERE Driver = '" & frmSSN & "'"
Set RS = cnStr.Execute(SQL_query)
WHILE NOT RS.EOF
%>
View Replies
View Related
I am using a new payment gateway for one of my sites. One of the options they recommend for submitting the credit card info involves submitting a form in "the background" with a post. They then return a comma-delimited string, which I can easily parse and act upon.
How do I submit a form in the background? I'm sure it's simple, I just never had to do it so I never learned how...
View Replies
View Related
if i have a vbscript function on a certain form and I assigned some values on an array variable on that function, is there a way for me to retrieve the values of that array on another asp page once i submitted the form?
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
I'm turning my application into a "DLL". Everything worked fine untill I try to do a "While" in my asp code. Then I recieve an error like this:
"Object variable or With block variable not set"
My vb code look like this.....
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
Last week I posted in the graphics forums regarding a photo I have that I needed to slowly change from day to night.Now I have the various stages, I need them to display on my site, according to the time of day.For example:
Between 5am and 7am display the early morning picture
Between 7am and 5pm display the day picture
Between 5pm and 7pm displayy the evening picture
and so forth.
View Replies
View Related
I'm having a domain change foisted upon me and the test I did resulted
in every last ASP and
ASP.Net script stopping cold. Nothing but plain old html worked.
Is there a FAQ or some other document available that outlines what has
to be done when the
IIS server machine is disconnected from one domain controller and
reconnected to a totally different one? If not, does anyone here know
what would have to be changed to make the ASP code play nice in the new
domain?A relevant bit of info, they're also changing the name of the
administrator account. I don't know if that would contribute to the
death of ASP* on the system, but it might.
View Replies
View Related
i have an insert record and edit record page. When inserting to the db, it uses now(). When I go to edit an existing record the date stays as the original date. How do I make the date change to the amended edit date?
View Replies
View Related
I have used ASP for years using MS Access and have used MSSQL quite a lot as
well. I have never came across something like this before.
MSSQL table names and types:
ProductName nvarchar
ShortDescription nText
ThumbNail nvarchar
etc
When I have the recordset in the order as follows, all works well:
(Recordset2.Fields.Item("ProductName").Value)
(Recordset2.Fields.Item("ShortDescription").Value)
(Recordset2.Fields.Item("Thumbnail").Value)
Though if I have the Thumbnail first the description does'nt show.
View Replies
View Related
how best to convert an application which is all in English to be able to roll the app out to say Germany or France and it all appears in the correct language
View Replies
View Related