Clear Certain Fields
im using the following code to loop thourgh field to prevent same value being added twice by the user in different fields, Code:
View Repliesim using the following code to loop thourgh field to prevent same value being added twice by the user in different fields, Code:
View Replieshow can I clear Session("sString") on a hyperlinK?
example:
<a href="default.asp">Goto page 1</a>
the Session("sString") should be "" (blank)
I have a website that would set two cookies when a user logs in
successfully.
<%
response.cookies("login_status")="OK"
response.cookies("login_id")="12345"'This value is from database.
response.cookies("login_id").domain="mysitexyz.com"
%>
and I have a question in "removing/deleting/cleaning the cookie when
the user logs out.
From my understanding there are two methods -
#1 (I am currently using)
response.cookies("login_status")=""
response.cookies("login_id")=""
#2
response.cookies("login_status").expires=now
response.cookies("login_id").expires=now
My questions is, what's the difference, advantage and disadvantage of
these two methods?
I am asking this because I have noticed that there are some problems
in #1. In my computer (I use IE7) if I login as one user, logout, and
then login as another user, the cookie value will get mixed up.
Somehow the response.cookies("login_status") can display correctly but
response.cookies("login_id") cannot. But if I clean my browser cache,
close my IE and reopen it, both cookies work fine.
im using an array inside a do while loop. how do i clear out my array
before i run back through the loop?
how to clear the combobox by calling a function in ASP.
View Replies View RelatedWhen I submit information i post it to a page and when it’s reloaded it runs as code accordingly if I refresh it re runs the asp because the information is still posted. How do I clear the posted information? Or possibly after it runs the asp code alter a value in the posted information.
View Replies View RelatedWhen I release session objects I do this
session("username")=""
So whats the difference when I do this
set session("username")=nothing
or
session.remove("username")
Isn't I already release it with a null value?
i have a form with a textarea(the value is taken out from the database) i would like to know if it is possible to erase contents in that file and not delete it using asp or javascript? or is there a way to select all the text in that textarrea and clear it?
View Replies View RelatedHow do i clear a page of boxes and only allow the last response.write to show? And is there a way to allow the page to show for a while the response.write and then bring it to another page by a certain timing?
View Replies View RelatedIf the user want to log out from the web site, do i need to provide the any coding to clear the session?
View Replies View RelatedIs there any way I can clean the cache at the top of each web page so that users cant use the back button in explorer ?
View Replies View RelatedI need the Clear Button to clear all the fields/values that i have in one of the table in my form. Can that be done?
View Replies View RelatedIs there a way that i can force a drop of all connections to a database. My problem is Access keeps locking my database, i have multiple users using this database, at different periods of the day, and i need a way to clear all connections, i.e at set points throughout the day or at request.
I do close the connection and set all record sets to nothing not sure what else i am missing?
I have a form submission page that I am using some session variables that are created on the page in order to keep track of the information that they have already inputted - so when they click submit if there are any errors the fields that are correct remain populated.However, I am wondering is there a way that if they navigate away from this one page all the session variables that are created are removed so if they come back to the page they need to re-enter the information?
Something like "on page exit - remove session("name")..." ?
I have an Access database containing 10 Tables with a lot data in each Table. I need to copy the database with no data in another directory. Is there an ASP code or object that allows me to clear data in all Table at once? How can I clear all data from Access DB?
View Replies View RelatedHow can I clear Request.ClientCertificate. When I want clear the session of my digital certificate, I cannot until I close IExplorer.
View Replies View RelatedI am worried of accumulated old cart product selections from expired browser windows or other unforseen events. I am holding selected productID's & quantities & userID & sessionID in a sql table from a shopping cart.
I allow user to clear their cart from a button and also automatically clear their cart on user logon. Also on checkout I clear their cart. I am storing selections with sessionID & UserID so they will be unique,. But does anyone reccomend any other cart selection maintenance procedure i could use,.
The back button that appears on every browser has a list that allows moving back to a specific page quickly, I'm sure you all know the one I mean. Is there a means of clearing said list? perhaps some DHTML method or the like?
View Replies View RelatedI have an image gallery in a database and I display one item at random with each refresh. I also have 2 buttons "next" and "previous" to show next or previous items in my recordset. Everything works well except for the fact that once the user has used either "next" or "previous" it leaves my query string in the url bar:
index.asp?action=previous
therefore, if I click "refresh" it continues to display either the next or previous entries instead of dislaying at random like it should.
How can I clear the query string from the url if the commend comes from the refresh button?
Is there any method to clear a form collection after a post without have to do a response.redirect? I am trying to avoid having the form re-submitted a second time on a page refresh.
View Replies View RelatedI am trying to get a thorough understanding of a code where a addition or
deletion of records can be done from a list of records. For addition part of
the form, data is being obtained from set of input boxes. Code:
Are there ways to let browser forget about the previous submitted form data?
Or prevent user from pressing F5 to submit the same form again
Or prevent user from presising back on the browser?
I have a non anonymous site in IIS5
The site is for collecting any kind of data from employees.
Authentication is done with the server variable "Logon_User"
Pages:
start.asp - Authentification mask appears -->
form.asp - form for data input -->
form_ack.asp - displays the data again and stores in SQL when
acknowledged in checkboxes
After data are stored I'd like to have a button such as "Log off"
which points back to start.asp.
In the samples I tried there is always the current logged in user
present even when I do a "session.abandon" or
"Session.Contents.Remove"
But how can I "reset" the current logged in user?
I have 2 fields in my database. One is startDate one is endDate. I want to display records according the current date. So far I can select all records where the startDate is greater or equal to now by using
Code:
SELECT *
FROM items
WHERE itemDateStart >= now
It seems the BETWEEN claus only accepts value, not fields.
So basically I want to select * from items between itemDateStart and itemDateEnd
I have a need to be able to identify which fields within a database are key fields.I did find the Attributes property of the Field object contains information for a field in a recordset. One of those values for the Attributes property is identified as adFldRowId which should identify whether the field is used as a key, but it doesn't seem to work. I'm currently reading off an Access database.Does anyone have any insight in being able to identify key fields within a recordset?
View Replies View RelatedI have set up my database with 4 fields (num1, num2, num3, sum), and have created a form with 3 fields to insert 3 numbers. That part is easy.My problem is when i submit these 3 numbers (5, 7, 6) i want the form/script to add these numbers together and insert it into the 4 field "sum".
View Replies View RelatedI have a database table and I am building a search-like page which is supposed to pull information from the database based on the following. "Get records where field1 is 30% (or more) higher than field2 within a specific time period". Should these records be chosen by the SQL query itself?
Or should I get all the records within the time period using GetRows, and loop through them checking whether or not it fits the criteria? While I certainly feel more capable of the second approach than the first, I am not sure if its the best way when large numbers of rows are involved.
I want to create an order form for prints online... I will have up to 200 prints to be selected. What I am thinking is that I will have an HTML Form that has all the 200 thumbnails with a check box next to them. They select the ones they want and push next. Then I would like it to create a set of options for each one they selected.
That basically says the image name then has a check box for 5x7, 8x10 and a text box for the amount for each... I do I create the page what creates these selections and how to I incorporate that into a mail form going to the next page?... it seems like a simple enough idea. Am wondering how the reality of it will be.
Say I have to different recordsets that have the fields:
rsA.Fields.Item("A").Value ,rsB.Fields.Item("B").Value
How would I add those to fields? It may be my inexperience but when I
tried something like
rsA.Fields.Item("A").Value + rsB.Fields.Item("B").Value
didnt work because one of the fields was a empty value. I have about
6 fields i need to add together if a value exists in any of them.
Suggestions?
I have a loads of records in an Access database relating to publications. The publications come in 3 forms, pdf, Word or .htm so I have fields for each called PDFurl, Wordurl and Publink. What I want to do is, if any of those fields contain a value then display an appropriate icon (which will link to the publication).
I'm ok with the latter part but how do I determine if any of the fields have a value and if so display the relevant icon? Rather than do a load of if then statements I was wondering is there a quicker way of doing this, perhaps using a Case?
how would you join the two felds from a table in the database so it can show the image from joining the two fields to know wherethe image is coming from
Quote:
<img src="<%=(rs_lprojects.Fields.Item("image_folder_path").Value)%><%=(rs_lprojects.Fields.Item("image_src1").Value)%>" />
I have been writing out the general steps
I want to do in plain english before writing ASP.
The values come from a customised data grid (not in .NET) that is
generated according to what fields need to be recorded for that record.
What I want to try and do is as follows:
- Read form fields into input array (skip first three values :
savevalues, userid, productcode) - Save last value of every row (add to
quantity for extra info) - rest of processing
Is the first one even possible using plain ASP? I remember being able to
do it using Javascript, but I couldn't get it to work properly.
I have tried to use Arrays in ASP before, but without much success.
is there a way to write a insert statment with out typing out all of my field names? i want to do an insert in every field but i don't want to have to write them all out.
View Replies View Related