Solved

How to make browser go back to home page after click screensaver?

Posted on 2004-10-19
12
228 Views
Last Modified: 2010-04-17
We have a PC in the retail store with our web site running on it. After 20 mins the screensaver will coming up. If customer use the mouse or keyboard, I'd like the browser to go back to the home page. How could I implement it? Any idea would be appreciated.
0
Comment
Question by:sliu00
  • 6
  • 2
12 Comments
 
LVL 19

Accepted Solution

by:
RanjeetRain earned 125 total points
Comment Utility
Not unless you have written the ScreenSaver yourself :)

Though, a secondary thought is: you can implement a keyboard hook, that keeps watching the keypresses. If the event has been recd by the ScreenSaver you may pass it to the web browser, which will, in turn, open up the home page.
0
 
LVL 1

Expert Comment

by:jet-fuel
Comment Utility
Actually, you can put a timer on the web page synched to the time it takes to start the screen saver. when the page hasn't been refreshed for 'x' amount of time (corresponding to the time the screensaver takes to come on), then the javascript automatically recalls the home page:

function startTimer() {
      setTimeout("window.location='homepage_url';", 120000); // Wait for 20 minutes, then go to home page.
}

<BODY onLoad="startTimer();">
...

You will have to reference this javascript in all related pages though. Once that is done, you simply have to keep your screensaver and javascript timeout in sync.

-----------------

Another idea could be to monitor the delay between two javascript events... If that delay is long enough, then you can do the javascript recall to the home page.

Cheers!

0
 

Author Comment

by:sliu00
Comment Utility
The problem is that some links in my page  point to some web site which is not under my control.So I can't put timer in every page.
0
 
LVL 1

Expert Comment

by:jet-fuel
Comment Utility
Ok,

Another option then, is to use frames. One for the main web window, and the other as a hidden frame page that checks for events.
0
Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

 
LVL 1

Expert Comment

by:jet-fuel
Comment Utility
So whether or not the web page is one of your pages, you still have a frame that is yours that does the timeout and resets the webwindow to the homepage.

0
 
LVL 1

Expert Comment

by:jet-fuel
Comment Utility
Ok, I made it sound as though it's easy!! :p But I think it's rather complex.

A least satisfying option would be to put a meta refresh tag and redirect after n seconds to a specific URL. The only problem with this is that every n seconds, it will reset to the homepage.... So if you set it to 5 minutes, every five minutes it would send the content page back to the homepage.

I can't really look into it right now, and I'm not convinced that there is an easy way of doing this through web scripting.

Perhaps and external application could do the trick.
0
 
LVL 1

Expert Comment

by:jet-fuel
Comment Utility
I will try to cook up a solution over the weekend if time allows it.

Cheers!
0
 
LVL 1

Expert Comment

by:jet-fuel
Comment Utility
Ok, well I did some searching, and I guess you'll have to scrap the idea if you want a web implementation. The following link confirms my doubts that there are security issues involved. After being unable to achieve the result expected of fetching the url of a third-party page I figured it must be security related... In fact, upon catching the javascript error in IE, it says Permission denied, when trying to call this : parent.content.location.href (If the page is from another domain).

https://lists.latech.edu/pipermail/javascript/2001-March/000148.html

I don't really see any other way of doing this unless you program a standalone app that runs in the background and somehow affects the open browser to redirect its URL to the homepage.. But that's out of my ball park unfortunately.

Sorry I couldn't be of more help. Perhaps, someone else will come up with an interesting idea.

Good Luck!

0
 
LVL 19

Expert Comment

by:RanjeetRain
Comment Utility
>> I don't really see any other way of doing this unless you program a standalone app that runs in the background and somehow affects the open browser to redirect its URL to the homepage..

My first comment was on the dot as was confirmed by the above comment from jet-fuel.
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
zeroMAx challenge 20 76
ClickOnce Install - Shortcut Question 3 57
word0 challenge 3 55
Arduino EDI - Programming language 3 60
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now