What Event To Create Cookie When Leaving A Page?
I want to create a cookie that will expire in a few mintues after a user leaves my page so that they can return without having to login again if they were only gone for a few minutes. I tried putting this code in the Page_Unload event but got an error message that cookies not supported here.
....
Sub Page_Unload 'this not working here
Dim objCookie As HttpCookie
objCookie = New HttpCookie("mycookie", "cookie1")
objCookie.expires = DateTime.Now.AddMinutes(2)
Response.Cookies.Add( objCookie )
End Sub
</script>
What is the best place to create a cookie that will only last for a few mintues after leaving a page.
View Replies
ADVERTISEMENT
When I set a cookie in global.asa in the sub session_onstart, even if
I have "privacy" in IE 6.X set to "block all cookies" the cookie is
still set, and I can get it on other pages.
I can't find an article that addresses this as a specific issue. Why
does the browser get the cookie when it is set in the session_onstart
event even when I have "block all cookies" set?
View Replies
View Related
How can I create a privacy policy for a cookie? I have an invisible image loading on a 3rd-party hosted site to help me watch traffic, but the cookie I'm using is being rejected by IE6 browsers on their default Security setting because I lack a privacy policy.
How can I add a privacy policy to the cookie I'm creating (with ASP)?
View Replies
View Related
How do I track a referral from an affiliate site through a cookie. I would like the aff links to be formatted
Code:
View Replies
View Related
I have 2 pages, when the browser window is closed and depending that the user has not already taken the survey and also that the user has not declined to take the survey, i will open a survey form for the user.
Now i have links on these pages also. I only want to show this survey if the page is closed and not when the user clicks on the links (as at this time current page unload event is called too). How i can accomplish this?
View Replies
View Related
Is there an event that signifies the end of a page load?
View Replies
View Related
The page loads and allows the user to enter an MLS number. After the user enters the number and clicks on the retrieve button the page retrieves a record from the database with that key and loads the information into a series of textboxes and lists for editing.
If the user enters and invalid key and no records are retrieved a lable displays a message. After editing the user hits save and the updates are made to the database.
In reality after the user clicks retrieve and the record is loaded the buttons on the form go dead. If the user failed to retrieve a record, the lable is displayed, and the buttons still work. I have no ideas as to why this would be happening.
View Replies
View Related
I need to parse a long string into no more than 30 character chunks, but I also need to leave the words intact. Right now, I am using:
For intStart = 1 to Len(strOriginal) by 30
strPrint = Mid$(strOriginal, intStart, 30)
Print #detailFile, Tab(1), intStart, Tab(4), strPrint
Next intStart
and it's fine, but splits up some of the words. If I could figure out how to find the preceding space of the 30 limit, I'd be in good shape.
View Replies
View Related
I have some ASP 3 pages that instantiate a COM component. That
component writes messages to the one of the Windows event logs.
Things work as I expect them to on XP Pro but not on 2003 Server. I
figured it was a security thing, so I surfed around and found that
permissions were tightened in the server's first service pack. The fix
I found[1] said to append an ACE[2] to the event log's CustomSD
registry value found at
HKLMSYSTEMCurrentControlSetServicesEventLog{L OG_NAME}CustomSD
I tried three different ones with a reboot after appending each one:
1. (A;;0x3;;;AU)
2. (A;;0x3;;;NS)
3. (A;;0x0002;;;S-1-5-21-237510213-3056582554-1478882900-1003)
The last uses the full SID of the IUSR account on the Windows 2003 I'm
working on. I obtained that ID using this vbscript: Code:
View Replies
View Related
I have a string of HTML (used for a specific purpose) that I'd like to
use somewhere else but as plain text. Rather than introduce a
specifically created plain text version I'd like to strip the tags code
from the HTML version. This in itself is easy, using a function such
as:
Function HTMLDecode(Expression)
Dim sTemp
sTemp = Expression
sTemp = Replace(sTemp, ">", ">", , , 1)
sTemp = Replace(sTemp, "<", "<", , , 1)
'Repeat for each defined entity
HTMLDecode = sTemp
End Function
However, the difficulty comes when trying keep each paragraph seperate.
For example, the string "this is<p>my name" shows on screen as:
this is
my name
if I use the above function, it strips out the <p> tag and shows the
result on one line:
this is my name
I thought I could use something like:
str = replace(str, "<p>", chr(10))
but that doesn't seem to work. Can anyone help me replace <br> and <p>
tags with something that's recognised as "plain" text but will keep the
paragraphs and new lines formatted correctly??
View Replies
View Related
I am working with a developer, on two portions to a site, he is working in PHP and my work is done in ASP.
Is it possible for my pages to request data from a cookie that was written by his pages that are PHP but residing on the same server? Just want to make sure before I spend too much time planning out the development on my end.
View Replies
View Related
I currently have an event calendar that works fine so far.One thing i would like to improve is that when there is an event on that date,i wish it to be highlighted with a different color. Code:
View Replies
View Related
I'm building a multi-langual site, and I want to store the language selected in a cookie. When the querystring contains a "lang" parameter, I'm changing the cookie's value. The valuese represent the language ID in my DB. When no var passed throgh the QueryString, and no cookie found, the system should put the value of the default language in the cookie.
The only problem is the cookie is being erased somehow after the only page I created so far is over. the page itself can access the cookie, but once it's processing is over, the cookie no more exists.
I have no idea why it happenes, nor how should I fix it. I've set the cookies("name").Expires = DateAdd("m", 1, Now()), and checked there is no other access to the cookie. But nada. the cookie still vanish every time.
View Replies
View Related
I have 3 domains, A, B, and C.
I want to put the same JS tag on sites A and B that call an asp page on domain C.
The tag would look like this:
<script language="JavaScript1.1" src="http://secure.C.com/Demo/Intercept.asp"></script>
The ASP page on domain C would write a cookie, in theory the cookie should have permissions for read and writing from site C.
Something like this:
Response.Cookies("Name").Expires = Date() + 365
Response.Cookies(SurveyName).Domain = ".C.com"
Response.Cookies(SurveyName).Path = "/"
In firefox the result is exactly as planned, a cookie is set when a user goes to sites A or B via site C, and using this same approach, I can read the cookie from domains A and B via the JS tag calling the script on site C.
IE does not like this. Sometimes it doesn't even write the cookie, other times the cookie has to be there b/c of resulting actions taken, but when viewing the list of cookies, it's no where to be found. Additionally, I don't seem to be able to read the cookie the same way as firefox is letting me.
I know this can be done, I went to foodnetwork.com (yeah I love to cook), and saw that they were using a metric service that was calling a back end script from the vendors domain, and setting a cookie from that vendors domain, all without the user seeing anything or leaving the foodnetwork.com domain. I've looked at the resulting JS code that is returned from these vendor back end pages, and it has nothing to do with the cookie being set, it's definitely happening server side.
View Replies
View Related
I'm trying to write an asp page line by line, as one would create a
text file, only my file will end in .asp.
One line simply writes a close ASP code tag, or
FILECONTENTS=FILECONTENTS & "%>"
When this line processed, an error occurs saying that the string was
never terminated because the asp page attempting to write this line of
code to a NEW asp page reads that close ASP tag (%>), as an actual
close asp tag for itself, instead of a STRING value.
How do I write this %> symbol to a new asp file, while still
maintaining its purpose to close a group of asp code in the newly
created page?
View Replies
View Related
I have downloaded a nice upload script from the internet, it works great, but I would like to have it protected,so that only the admin user can use this upload page, I'm getting the following error:
Microsoft VBScript runtime error '800a01b6'
Object doesn't support this property or method: 'Request.Session'
If I change it in Request.Cookies, that won't work either.....
View Replies
View Related
I'm looking for a tool that would allow me to create a web page with the
spreadsheet like functionality. Basically, I want to be able to type in a
number in the cell and have all totals being calculated automatically
without having a page refreshed (or a trip to the server).
That would be possible to do with MS Excel web plug-in but I don't want to use plug-ins. I want users to just access the page and don't worry if they have MS Excel or
MS plug-ins installed.
Is there a solution that would accomplish that? I can be written in any
language like ASP, JSP, DHTML, PYTHON or PHP or a third party tool. I really
don't care. I just wont to create a page with the spreadsheet like
functionality.
View Replies
View Related
I have an ASP page that updates a processes a large amount of data n' takes a couple of minutes. I want to create progress bar .
View Replies
View Related
I work for a security system company. I'm in the installation department. One of the things we do is go to our monitoring service's website and check the signals to see if we got all of the signals for a particular alarm system.
Unfortunately, that means refreshing the page alot.
So, I started off using an iframe page to refresh the content i wanted. the only problem was that the urls i used to login and set the customer ID would go to another page.
So I tried to create a frameset document. However, the .asp pages completely ignored the frameset information. Code:
View Replies
View Related
I am trying to create a file on my server / localhost but when I run the script below the page starts loading and then eventually times out. Code:
View Replies
View Related
I have index.asp (Form) & process.asp (submit data from index.asp to Access Database), the Form is running Perfectly.
But, How can I create a login name and page for the applicants to edit the information they submitted?
Let say I have Email (username), Password (password) & lastname on index.asp, then I really have no clue!
View Replies
View Related
can the adobe FDF toolkit be used to dynamically create a several page report using data from a recordset in ASP? As far as i can see now, it is only useful for filling in form fields from user submitted data.
Another option we are exploring is using the activePDF tools to do this. Has anyone had any experience with these tools? any comments/opinions? Can it do what we asked above?
View Replies
View Related
I want to know what's the differences between session cookie and regular cookie.
In ASP, when we create cookie, we do the following to identify an user:
Response.Cookies("name") = value
Is this regular cookie? How about session cookie? and when to use which?
View Replies
View Related
Here's what my code looks like...
View Replies
View Related
Is there a way to enter an error in the windows event application log.
View Replies
View Related
I have been looking for a solution on the web about the error we got in the following:
Script Engine Exception. A ScriptEngine threw
expection 'C0000005' in 'IActiveScript::Close()'
from 'CActiveScriptEngine::FinalRelease()'..
It looks like that many people have the same problem and no one seems to know why it happened and how to solve it. So far, I cannot get any useful and specific pointers/solutions on the web, not even on the Microsoft site. If someone has the same error and is able to fix it, please provide solution.
We are running Win 2000 server with SP4 and IIS 5.0. Our server is loaded with all the updated patches from MS. We are also using COM+ with IIS.
View Replies
View Related
When i click a anchor tag which will shows a particular data from database and display it in same page using ajax. Code:
View Replies
View Related
Can you please help me with event handling (for eg: capture key press, mouse overs, mouse_over drop-down menu, on_click drop down box) in asp.
View Replies
View Related
I want to handle events of the AO Connection object in my ASP page. How can I do it?
View Replies
View Related
I wrote this code:
<%@ Language=VBScript %>
<%
Response.Write "<SELECT id=Customer name=Customer
onchange=""text152='abc'"">"
Response.Write "<OPTION value=1>One"
Response.Write "<OPTION value=2>Two"
Response.Write "<OPTION value=3>Three"
Response.Write "</SELECT>"
Response.Write "<BR>"
Response.Write "<INPUT type=""text"" id=text152 name=text152>"
Response.Write "<BR>"
%>
But change the SELECT,onchange event not been called
View Replies
View Related
A button has to be clicked if a selection in drop down list has been changed. If not, a pop up message pops and reminds the user you need to click the button before continue. Can this be done in some ways?
View Replies
View Related
When a user changes the value in a select statement, I would like to update the recordset using a onchange event. Could someone please point me in the right direction? Would like to stay away from forms if possible.
<select style="width: 200px; font-size: 10px;" name="selStat" size="1">
<option value="<% = rs("Status") %>"><% =rs("Status") %></option>
<option value="CLOSED">CLOSED</option>
</select></td>
sql="UPDATE dbE SET Status = 'CLOSED' WHERE EMAILid = 25"
View Replies
View Related
Is it possible to send an event to an IIS/ASP application from an ActiveX/COM component? Assume that the ActiveX/COM is created when the Application starts (as an application scope variable initialzed in global.asa), and it is deactivated when the application stops.
What I need to do is to register an ASP function as an event handler with the ActiveX so that it can receive the event when raised by the component.
View Replies
View Related