|
Welp one way I can think of getting the same end result is to set the session expiration to a really low number, like 2 minutes, and then have a mechanism in each page that keeps the session alive as long as the person has the browser open and on that site (regardless if they are idle or not).
I usually do this by having an iframe in every page that points to a page that grabs the system time every minute using a meta refresh tag. A javascript refresh would also work in this scenario.
|
|
|
|
|
I had to deal with a similair issue yesterday and here is what I did..
Situation, Users log in and we adjust their profile to show them as "Logged In", which allows us to produce an accurate list of "Current Users". Whne a users logs off (using the "defined" method, which is a button), then we update their profile to show them as "Logged off". When user logs in when user logs off, we capture the time of these two events and we produce a report of "Time Using System".
Well, as you are now seeing, users dont always use your "buttons". So what I did was add a Log-Off catch in the Session_OnEnd section of the global.asa like so:
Sub Session_OnEnd
' Decrement the current number of active users
Application.Lock
Application("CurrentUsers")=Application("CurrentUsers")-1
Application.Unlock
' Close the current users open session and adjust DB
set conn = server.createObject("adodb.connection")
conn.open("Server=SQLServer.petcarefinder.com;Driver={SQL Server};Database=Users_DB;UID=Username;pwd=Password;")
conn.execute("dbo.con_LogUserOutOfSystem('" & Session("UID") & "')")
conn.close :: set conn = nothing
End Sub
This only "Logs Off" the current session, it doesnt wipe out all sessions on the server. I have tested this relentlessly in the last 2 days and it seems to never <u>not</u> work.
let me know if this would help you ....
- Sage
|
|
|
|
|
I am with Sage, use Session_OnEnd , that is exactly what it is for
regards,
Paul Watson
Bluegrass
South Africa
Miszou wrote:
I have read the entire internet. on how boring his day was.
Crikey! ain't life grand?
|
|
|
|
|
Paul Watson wrote:
I am with Sage, use Session_OnEnd, that is exactly what it is for
Certainly Sage has answered that question . Unfortunately being a demanding woman I want more!
We also have a situation where the IFA's don't realise they are actually leaving our site when they click the red "X" to close the browser. Don't ask me to explain this madness - I can't! It's merely an observation which brings us pain. Then they want to know where all their work has gone . As we've established above "window_onbeforeunload()" unfortunately not only fires when a browser is closed, but also when moving between pages. Being the demanding person I am I find myself on a quest to find an action I can fire only when the user attempts to close the browser so that I can display a confirmation box explaining to them that they are actually leaving the site, not just minimising it to go to the solitaire game behind it if they click the red "X" and close the browser .
Any ideas? (please don't say user education...)
Look at the world about you and trust to your own convictions. - Ansel Adams
Meg's World - Blog
Photography - The product of my passion
|
|
|
|
|
well then, like many web developers before us and many developers after us, it sounds to me like it is time to take a hint from a porn site or warez site. I dont know how many you have seen (not that I look at porn all day long or anything), but many of them have some "sticky" tricks which end up making their way into the legitimate side of the Internet. Pop-up ads are the most famous.
The reason I mention this is another trick many of them have been employing for some time now is to open the browser in a fashion that none of the toolbars exist. For a user that dont know better (and dont know keyboard shortcuts), it is near impossible to close these windows. This sounds liek soemthing for you. Of course, you would need to "emulate" the minimize and close buttons, but it will help you do what you need to do.
I would need to hunt down an example, but I thought I would throw the idea at you and see if it interests you.
- Sage
|
|
|
|
|
How can I load a stylesheet depending on the clients resolution. Initially, I know that in the <head> section you should have something like:
<link rel="stylesheet" type="text/css" href="mybase.css"/>
But is it possible to have it so that you can call a function (in an external script, passing in clients size and returning a file name) and using that as a replacement to mybase.css? If so how do I do that?
This is so I can use different backgrounds for different resolutions, so that I do not have multiple copies of the same page
|
|
|
|
|
There's a couple different ways of doing this. One is to use CSS expressions, but this is only supported in the later versions of Internet Explorer.
Another way is to use some sort of entry code for each page on your site plus cookies. When a user loads a page (window.onload ), gather the information you want, put that in a cookie, and reload the page. If the cookie exists, you don't do this step. (This requires dynamic pages like ASP, ASP.NET, PHP, JTHML, etc.) The server reads the cookie and spits out the appropriate line for the stylesheet in the header (conditional server-side include).
Although, if all you need to do is display a different background, you can do this with the body.background property directly in script.
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
Is it possible to do something like:
where "myfunction" returns the name of a file. I want to do this so that there is little or no code in the main body. I know "myfunction" will not be in quotes as it it is not a stylesheet. So how would I write this if it was calling a function (and returning a value????
On other thing if I wanted to get the screen width from an external stylesheet, what would I pass in as object, i.e. this or screen, and how is it referenced in external script???
Sorry for all the questions, but I am really new to this
|
|
|
|
|
No, you can't evaluate an expression like that. I still recommend you do what I was saying with the one-time cookies. After all, that's why Netscape invented them many, many years ago. Once the cookie exists, your server-side code conditionally includes the right stylesheet (with a fallback in case scripting was disabled or an error occured).
If you are only targeting IE, go to the MSDN Library and then Web Development, then CSS. You could expressions within the stylesheet, but other major browsers like Mozilla don't seem to support this (rightly so, as Microsoft mentions that it's proprietary).
What do you mean, "get the screen width from an external stylesheet"? If you mean get the screen width within the stylesheet in an expression, you just reference the screen object like you would in DHTML. CSS expressions have access to the same DOM that the page does, i.e. they are evaluated in the same manner - all based on the implicit window root object.
If you are new to this stuff, I do suggest that you browse the various "Web Development" sections in the MSDN Library I linked above. There's a lot of good information about CSS, DHTML, and scripting. Not just the IE-specific stuff either, but also the standards. IMO, it's a better reference than most I've seen, including the W3C's web site (they make up the rules about this stuff) that covers everything in-depth in ways that most n00bs wouldn't understand (learn how to crawl before you dance!).
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
i am working on asp.. is it possible to get the hyperlink associated with a particular cell in excel sheet so that i can generate web page dynamically
like this...
Name1 name1.yahoo.com
name2 name2.rediffmail.com
.
.
please note that only name column is present in the excel sheet, their email ids are hyperlinks which are not stored in cells explicity.
please help ....soln required
kavi
|
|
|
|
|
I am trying to use DIV tags and CSS to create the layout of a web page. I want to have the content centered in the page.
I set the text-align of the BODY to center.
I then use a DIV tag and I set the width to 780px.
The problem is that in IE the DIV is centered properly but in Netscape and Opera its align on the left.
In addition I want to set the padding-left style of the DIV to 5px. In IE and Opera it shows ok but in Netscape the background-image of the DIV is messed up.
Any hints?
Thank you!
theJazzyBrain
Wise is he who asks good questions, not he who gives good answers
|
|
|
|
|
You can use the following trick to horizontally center a div :
div.my-div-class {
position: absolute;
left: 50%;
width: 780px;
margin-left: -390px;
} The same trick will also work for centering vertically.
- Mike
|
|
|
|
|
This is perfect...
Thank you very much... well done!!!!
;P;P;P ;););)
theJazzyBrain
Wise is he who asks good questions, not he who gives good answers
|
|
|
|
|
Normal method of centering divs horizontally would be to set the left and right margin to auto. Does not work on IE though but the text-align: center covers that for IE.
margin-left:auto;
margin-right:auto;
text-align: center;
Rocky <><
www.GotTheAnswerToSpam.com
|
|
|
|
|
Hi,
I'd like to create a webservice with many method and I want to restrict access to them.
For exemple : I've got 3 users : user1 user2 and user3.
and 4 methods : mth1, mth2, mth3 and mth4
I want User1 to access only mth1
I want User2 to access only mth2 and mth 4
I want User3 to access all method
Is it possible or should I need to create a webservice for each case ?
Thx
Sybux
|
|
|
|
|
How often do you use it? Do you find it provides the only solution sometimes or could you implement your code so it didn't use eval() ?
Just curious
I'm drinking triples, seeing double and acting single
|
|
|
|
|
Where does one go to find help with a Perl project?
Need someone familiar with MLM and Commissions scripts.
Thanks....
|
|
|
|
|
how do i get get GMT time with respect to locale in oracle. in oracle there is timestamp variable which gives time and a offset like '+5:30' showing the time deviation from GMT. but is there anyway to get the GMT time directly.
|
|
|
|
|
i got the answer
what i wanted to do can be done as
select to_char(sys_extract_utc(systimestamp),'YYYY-MON-DD HH24:MI:SS') from dual;
|
|
|
|
|
we have quite a problem here at the moment: Flash Movies are obscuring all the other page content.
That is, the page comprises a javascript menu bar above a Flash map. When the menus drop down, they are always hidden behind the map. z-index makes no difference.
The difference between a pessimist and an optimist is that while the pessimist is always a victim, the optimist is always a target. - Brady Kelly
|
|
|
|
|
It's to the best of my understanding that flash is an activeX/com object which is not rendered with normal HTML code, but rather a plugin that sits on top of HTML, so no matter what you do you will not be able to make HTML show on top of FLASH movies....without some serious hacks to yer menu control anyways. But it wouldn't be a very acceptable hack IMHO.
Cheers
I'm drinking triples, seeing double and acting single
|
|
|
|
|
When i try to access the todo list i get this error
Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)
[Microsoft][ODBC Microsoft Access Driver] Syntax error (missing operator) in query expression 'IF today() > date_due THEN 'X' ELSE '' ENDIF'.
/todo/default.asp, line 73
i changed jasons code from this
strConnectString = "Provider=MSDASQL;DSN=ToDoLists;UID=dba;PWD=sql"
to this
strConnectString = "Provider=MSDataShape;DRIVER={Microsoft Access Driver (*.mdb)};DBQ=" & server.mappath("todo.mdb") & ";UID=;PWD="
think i got that right? anyway can anyone shed some light on the problem.
Thanks
Rob
|
|
|
|
|
hmm ... I am thinking that access doesnt support these functions.
today() is not an access function, try changing today() to date() and see if that helps.
- Sage
|
|
|
|
|
Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)
[Microsoft][ODBC Microsoft Access Driver] Syntax error (missing operator) in query expression 'IF date() > date_due THEN 'X' ELSE '' ENDIF'.
/todo/default.asp, line 73
now i get this error???
is there anyway to contact Jason in this site?
Thanks
Rob
|
|
|
|
|
I dont know Jason, but I know enough to be able to help you. Can you either send me the code from default.asp or send me the project and I will help you fix it real quick. I know how frustrating this all can be so I hope I can do soemthing to help you out and get you quickly on your way. Let me know..
- Sage
|
|
|
|