Clearing Form Data

was there anyway to clear the data submitted by a form? What i need to do is once the page refreshes, clear the sent data?

View Replies


ADVERTISEMENT

Clearing Form Fields Value Button.

I have a form that comes up pre-filled with database results for the values. I'd like to add a button, though, that will clear all fields to start blank if desired.

A standard "reset" button, will only clear input that has been typed in, but won't clear the initial values. Does anyone have a script already that does this or could someone get me started on how I could do this?

View Replies View Related

Clearing Values From Variable When Form Proccesses ??

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

Passing Form Data Using ENCTYPE="multipart/form-data"

I have a form that has the option to upload a file at the bottom. If you select a file it works fine but if you leave file selection blank the forms bombs. This is not how I want it to work. On the form you need to use ENCTYPE="multipart/form-data" in the form tag.

On the processing page I need to use Set to assign a variable to the form data. I tried using IF on the variable assigned to the file path but it bombs out telling me "This function is not supported". Is there any other way I can check to see if curQes has a value assigned to it?

View Replies View Related

Request.Form Doesn't Return Form Data

I have some ASP server-side code that works perfectly when the client is running on Windows (IE, Netscape, Firefox, etc.) but doesn't work at all when the client is running on Macintosh (IE, Omniweb, Safari, etc.) This is the client-side Javascript code:

View Replies View Related

Clearing Cookies

I have a page that creates a cookie on your computer. at that point it stores login information. Seeing that I am on the administration side and wish to login to accounts without the cookie getting in the way, I create a page to delete the cookie as follows:

Response.Buffer = True

Dim Cookie
For Each Cookie In Response.Cookies
Response.Cookies(Cookie) = "this must be something!"
Response.Cookies(Cookie).Expires = Date() - 1
session.clear
session.Abandon()
Next ' Cookie

For Each Cookie In Response.Cookies
Response.Cookies(Cookie) = "this must be something!"
Response.Cookies(Cookie).Domain = "hazsoft.com"
Response.Cookies(Cookie).Expires = Date() - 1
session.clear
session.Abandon()
Next


This removes the cookie like i desire but, I must first reopen my browser for the cookie to be totally removed. As you can see I have also removed the session variables. Is there a way to remove cookies and session variables, without having to close the browser window?

View Replies View Related

Clearing Cookies

The code below isn't clearing the cookie and sessions. It is used in my shopping cart to track the user and the items purchased/added to the cart. After making a purchase you are directed to the receipt page (where this code is). If you go back to the main site the items still show in the cart. Any thoughts?

' The below lines clears out the users cookies to allow for additional orders
Response.Cookies("customerid") = ""

(this part seems to work... when clicking refresh the proper error message is displayed etc.)
' The below lines clear session values to avoid duplicate ordering using Refresh
session("cust") = 0
session("cartID") = 0

View Replies View Related

Clearing Cache

Is there a way to clear cache using ASP, VBScript or Javascript?

I have created an ASP login page with sessions etc so unregistered members cannot view certain pages, however, when you logout you can still press the back button on the browser toolbar and view the pages, I want to find a way to make those pages expire by clearing the cache or something like that!

View Replies View Related

Clearing Cache With ASP

Does anyone know how to clear a sites cache with ASP. I have a login script that does not terminate the history when signing out. A user can simply click the back button and get back into the site..

View Replies View Related

Clearing A Submit

I have a form with 4 different Submit buttons. In the action code, I do a
request on the button names to see which one is valued. This all works
great, until the browser is refreshed -- the request shows the name of the
last button pressed. Is there a way to clear all the buttons so they don't
appear to have been pressed when they've only been refreshed?

View Replies View Related

Clearing Table Before Add New

Im useing Access, and trying to clear the table before i write to it, and to be able to keep it all on one page? Trunicate table or something like that? This is waht I have so far but doesnt work. Code:

View Replies View Related

Prevent The Forms From Clearing

I assume it has to do with cache control, but how do I prevent the form from clearing when a user hits the back button? The form I am referring to is my registration page. After the registration is submitted, they are taken to an error handling page. If an error comes up, they are required to hit the back button and correct the mistake.

It seems like for the most part it retains all of the information in the fields, but occasionally it clears it out. How can I prevent this?

View Replies View Related

Clearing A Text Field

How do I clear the data in this field before using the date function.?

<input type="text" size=35 name="DepartCentralDate" value="<%=x_DepartCentral %><%= FormatDateTime(Date, 1) %> &nbsp;&nbsp;<%= FormatDateTime(Now, 3)%>">

View Replies View Related

Clearing Session Variables

How can you clear session variables when a reset button is pressed? I thought I might be able to do something like:

<%
If request.form("Reset") = "Reset" then
Session("variable") = Null
%>

Is this correct, it isn't working right so is there a better way?

View Replies View Related

Clearing Cached Pages In ASP

I searched the forum and got the following code from someone who posted it in 2002. However I can't seem to get it to work in my asp page. Can someone confirm the syntax for me? I would like to try and put it in an include file rather, but need to get it to work first.

Response.ExpiresAbsolute = #1/1/1980#
Response.AddHeader "cache-control", "no-store, must-revalidate, private"
Response.AddHeader "Pragma", "no-cache"
Response.Buffer = True
Regards
Ronel

View Replies View Related

Submit Form Data And Refresh Form

I have a series a forms that submit data to different tables in a database. As it stands, when a user completes FORM 1 and clicks the SUBMIT button, the FORM 1 data is submitted (action = form2.asp, method = post) to ASP code at the top of FORM 2 (request.form("form1 field name") etc...), and submitted to the database with SQL code, also at the top of FORM 2(INSERT into...). Hence the submit button on FORM 1 directs the user to FORM 2, and submits the data which is exaclty what I wanted. However, I now need the users to submit multiple sets of data with FORM 1, and direct them to FORM 2 once they have finished using FORM 1. Most importantly, I need to pass a few parameters from FORM 1 to FORM 2, and have these parameters submitted to the database.

My main problem is getting a fresh form1 after submiting the same form1, in preparation for anoter set of data using the same form. Basically, the database has 'one to many' relationship tables. Form1 and form2 are both populating the 'many' tables, so that each form needs to be filled-in several times while retaining the key field of the 'one' table. At the moment submiting form1 takes me to form2. Is is possible to submit the data to the database, get form1 back again to submit more data, as many times as required, then click another button to load form2 when the user is finished with form1?

Can anyone please give me some pointers? or at least explain the concept of what I need to do. I am a novice and it's taking me a while to get to this stage. Any help will be greatly appreciated.

Is it possible to post FORM1 to itself and insert the data (i.e. place the request.form at the top of FORM 1) If so, how do I direct users to FORM 2 while retaining my parameters?

View Replies View Related

Appending And Clearing Details Into 2 Tables

I am trying to run and UPDATE, INSERT and DELETE SQL statements to update append and delete data from some tables in access. Here is the low down:

I want to update All of the fields from a table called TEMP into a table called POSTPONED, WHERE the 'postponed' fields = "False"

I want to then go on and clear the records from TEMP that have the field postponed = "false"

And finally i want to again append the remaining data in the TEMP folder into a table called RESULTS.

Does any one know how to do this or what the SQL statements should look like, i have tried writting them, no luck, i have tried generating them in Access but no luck because the ASP is erroring me on them and i dont know what its chatting about!

View Replies View Related

Global.asa & Resetting/clearing/deleting Application Variables

I'm just dipping my toes into server-side scripting.

The Global.asa file seemed really nice, but am I understanding correctly that the application onstart event is fired ONLY when the server is started/re-started or when the FIRST user logs onto an ASP application?

If that's the case, then all the changes I keep making to my Global.asa file are pretty useless, right? (which seems to be the case -- i.e., my pages are not using any of the new information). Code:

View Replies View Related

Form To Form Data Transfer

I am a new programmer seeking a right way for transferring data between forum to forum, as i am creating a site wich have a page keeping 20's of server controls like drop down list and text boxes the value of ddl2 changging on change of ddl1 and displaying its corresponding value in text box and i have 10 rows in this way and i wanna display all selected values of server controls in next page as report.

View Replies View Related

Passing Form Data Within A Form

I am trying to create a form where the user can check a box within a form and the address will fill in automatically from a previous address in the form, without submitting the form.

View Replies View Related

Request In Form Enctype="multipart/form-data"

I need to get some Request value from a Form... but this form is enctype="multipart/form-data" (to upload files) and I if I use the standard syntax Request("nameField") I don't get any value.

View Replies View Related

Form Data

I have a form which dynamically loads questions and answers depending on dept.
So the form input type has a value field of the actual answer text which is pulled from the database.
Sometimes the form can be 5 questions, sometimes more and sometimes less. So after the user submits the form, I gather the static input (ie. name, address, email, etc..) but
1. how do I loop to Request.Form for the dynamically generated answers if I dont know how many there may be?
2. How do I then take that data and use it in my Insert statement?
The questions with each answer will automatically generate the imput name field with the qid (question ID) which could be 1-?

View Replies View Related

Form Data

i have this page that inserts a form data into database... the problem is that it wouldn't let me insert my content into the database because of syntax problem... more specifically if i have an apostrophe.. it wouldn't let me insert due to the restriction of my code... is there a way to rewrite my code below so that i can insert apostrophe.. right now if there are ' in my content the strSql will screw up...

strSql = "INSERT INTO Events (Title, Author, Content, SDate) VALUES ('"&strTitle&"','"&strAuthor&"','"&strContent&"','"&strDate&"')"

View Replies View Related

FORM DATA

Does anyone know of anything or any issues that may cause HTML form box (shopping cart) to reset or not keep its posted value?

out of approx 2000 users, only 15 are having this issue and the common thing between them is using Mac's (Different browsers but mostly IE5 and Safari. even made one install latest firefox) instead of PCs.

Now I know this goes against everything I ever knew about SERVER SIDE SCRIPTING, but im really reaching for straws.

View Replies View Related

Keep The Form Data

I am developing a program now. This program has a front page for user to select a project. After the user hit "submit" bttion, he will go to another page which has a top menu.

User can see different part of project information by clicking there. I hope no matter in which order the user click on the items in the top menu, it will show the record based on this project until he select a different project. To realize this function, should I use cookies, or there are better ways to do that? It will be very helpful if someone can provide some sample code here.

View Replies View Related

GET And Form Data

I have this code...

If Request.Form("Name") = "" Then
Response.Redirect "error.asp"
End if

If the browser does a GET against this page, sometimes the Response.Redirect doesn't happen. It is as if there is form data being sent on a GET. Has anyone seen this before?

View Replies View Related

ASP Data Form

i am working my site using asp html vb javascript and css.

When a user registers on my site i would like them have their own page. I was wondering how would i be able to have a page made automaticaly after that person is registered? I am very new to javascript so....

This is the page after the user is done filling out the form: Code:

View Replies View Related

Send Form Data Using CDO

I'm trying to retrieve the data off a form (survey.htm) and email the results
back to me using CDO and ASP (survey.asp). I'm confused as to how to
retrieve the form data from survey.htm and send it using survey.asp. Below is
a sample ASP script that I found on ASPFAQ.com and it works fine, but now how
do I grab the info from a form and incorporate it into the emal. Code:

View Replies View Related

SQL Query On Form Data

I need to select the data where the data ID is equal to the variable supplied in the submitted form. Below is the line of code I used for the radio select and the code to do the SQL search on it. I get the following error using this code:

Error Type:
Microsoft JET Database Engine (0x80040E10)
No value given for one or more required parameters.
/MyWeb/CheckIn.asp, line 93

The items are listed by ID 1-X.

<input type=""radio"" name=""CheckIn"" value=x.value>Check In<br>

Dim junk
junk=request.form("CheckIn")
'If Session("UserType") = "User" Or Session("UserType") = "Admin" Then
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("db1.mdb")
Set rs=Server.CreateObject("ADODB.recordset")
'in below, WHERE id = Request.Form("CheckIn")
SQL = "SELECT * FROM CompsIn WHERE ID = junk"
rs.OPEN SQL, Conn, 3, 3

rs.OPEN SQL, Conn, 3, 3 = Line 93

View Replies View Related

Some Data Not Showing In A Form

I am using SQL 2000 database and MS Server 2003.

I am pulling in data from a sql table. For some reason, when I include
the following line:

<tr><td><b><%if rs("Street_dir")<> "" then response.write
rs("Street_dir") & "&nbsp;" end if%>
<%=rs("Street_num")%>&nbsp;<%=rs("Street_name")%>&nbsp;<%=rs("Street_suf
fix")%></b></td></tr>

then the following line does not display:

<tr><td><%=rs("remarks")%></td></tr>

The REMARKS data is blank. But, if I remove the upper address line, then
the REMARKS appears. The address is 1111 Main so that does not seem to
be the issue. The address information is VARCHAR fields, 255 characters.

This works fine on another server where my files used to be, but I just
moved to a new server.

View Replies View Related

Multipart/form-data Vs Xml

Is it possible if i wanna append xml data and upload picture at a same time using the same form?

The problem i'm facing now is, when i add the 'multipart/form-data', i can't append the xml data

I know there's one solution, using 2 FORM but the project i'm doing now is designed to be put them both (file type for upload and textarea for append) together

Besides, i have no idea how to encode or decode the posted data.

View Replies View Related

Odd 'extra' Form Data

This isn't actually causing a problem, but it's odd. I am getting additional data in the data posted by a form on a particular search script I have. I didn't even notice it (since it wasn't causing a problem) but I outputted the form data to screen just out of curiosity I found the following attached to the end of some data: §or=ANY

So for example, one part of the string might be:

&type=Brochure§or=ANY&publication=Evening%20Standard§or=ANY&etc.


It doesn't appear to be affecting anything, but I'm curious as to what that §or=ANY actually is.

View Replies View Related

Remember Data From A Form

I have made a form for users to place an order. When they select the submit button, the user is taken to a form where the user must select to confirm or back to modify.

My problem happens when the user selects the back button (either on the tool bar or on the button provided in the form). I would like the form to remember what the user had just inputted when they go back but currently all entries are blank.

View Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved