external javascript w/ activity timer question

For general issues related to PWB v2.

Moderators: Tyler, Scott, PWB v2 Moderator

Post Reply
spragers
Benefactor
Benefactor
Posts: 153
Joined: Fri Dec 27, 2002 9:11 am
Contact:

external javascript w/ activity timer question

Post by spragers »

Hi Scott,

I'm trying to set up the following using PWB's external javascript features:

Main page on our OPAC stations should display without any timers. When patrons browse our online databases and catalogs, they shouldn't be subject to any timers. When they click a link to access webmail, then the activity timer activates with a 10 or 15 minute countdown.

I found (in the forums) info on how to start the activity timer by using:

function OnClickActivity(time)
{
window.external.PWBActivity(time)
navigate( 'http://www.riponlibrary.org/webmail.asp' )
}

and

<a class="opac" href="http://www.riponlibrary.org/webmail.asp" onclick='OnClickActivity(900)'>
Webmail</a>

In the forums though, you state that:

Activity only has an effect when activity timer is used.

There's the ActivityStartOnOpen=False option, but I don't want the timer starting on any activity unless it is called from from the javascript link. I assume that if I set ActivityTimer=False, the javascript command to start the timer will not work at all. Should I just enable the timer, but make it an absurdly large number so that it won't time-out by itself, and then use the javascript call to change the timer to the 10 or 15 minute limit?

Thanks!

spragers
Benefactor
Benefactor
Posts: 153
Joined: Fri Dec 27, 2002 9:11 am
Contact:

Post by spragers »

Just to update: I sort of have this working; I have the activity timer in the INI file set for longer than the building itself will be open, and I have the javascript command set the timer to 5 seconds (for testing) when I click the link.

ActivityAction=Restart

However, when the timer expires, nothing happens, and then I get the message "secondinstance.txt not found" followed by "PWB is already running."

I have DisableExit=True, because I don't want patrons to be able to just close the browser window by themselves; does this override the ActivityAction setting?

Edit:

Ok, ActivityAction=Home goes back home - but it doesn't prevent the user from simply hitting the "Back" button and returning to their email account, now without any time limits. Is there a way to clear the back button history as well?

Or should I try the beta release and see if I can get a batch file to clear the cookies, history etc.?

Thanks!

Scott
Site Admin
Site Admin
Posts: 2528
Joined: Mon Dec 16, 2002 12:31 pm
Location: Rochester, MN
Contact:

Post by Scott »

What version of PWB are you currently using?
However, when the timer expires, nothing happens, and then I get the message "secondinstance.txt not found" followed by "PWB is already running."
It sounds like you have the disable second instance set to true.

The restart activity action will override the disable exit, but PWB tries to start a new instance of itself before it is closed causing the error message.
Or should I try the beta release and see if I can get a batch file to clear the cookies, history etc.?
Starting in PWb v2.08.1 the cookies are deleted when the cache is cleared by the clear cache on close.
Ok, ActivityAction=Home goes back home - but it doesn't prevent the user from simply hitting the "Back" button and returning to their email account, now without any time limits. Is there a way to clear the back button history as well?
The back button history is held in memory by Internet Explorer and only cleared by restarting PWB.

--Scott

spragers
Benefactor
Benefactor
Posts: 153
Joined: Fri Dec 27, 2002 9:11 am
Contact:

Post by spragers »

I believe we were still using 2.093, I just noticed today that 2.10 was released within the last few days. These test stations are still running NT (we've been waiting for someone to donate some moolah for over a year now to get rid of these last two dinosaurs lol...) I noticed that the button icons look corrupted, but I'm not going to worry about that.

Hey, it worked! Now I just need to make some actual files for the time limit warning messages, and we should be good to go.

If this all works, we'll be able to add up to 5 express email stations.

Also (and this may have nothing to do with PWB) Google Mail doesn't load until you manually reload the page afte rlogging in... weird.

Then again, it's NT and an old version of IE, what do you expect? :)

Scott
Site Admin
Site Admin
Posts: 2528
Joined: Mon Dec 16, 2002 12:31 pm
Location: Rochester, MN
Contact:

Post by Scott »

The buttons in PWB v2.10 are 24 bit color were as in PWB v2.09 they are 256 color, I wonder if that is making the difference under Windows NT. You can replace the button graphics in PWB v2.10 pretty easily. Check out the PWBv2.rtf file.

I will look into the Google problem.

As a side note, using XP and IE 6, GMail seems to work.

--Scott

spragers
Benefactor
Benefactor
Posts: 153
Joined: Fri Dec 27, 2002 9:11 am
Contact:

Post by spragers »

Thanks Scott, prompt and accurate help as always :)

The page where I'm setting this up can be found at http://www.riponlibrary.org/OPACexpress.html in case anyone cares to take a look at the code. My next step is to link it to my computer sign-up system, so that the email links are only active when all of the regular stations are in use.

edited for typo in link

Post Reply