Obscure scripting advice...?
- Started
- Last post
- 5 Responses
- Sneakybadger2
Hey everyone,
I need some sort of method to auto "back button" a browser (on windows platform) after a predetermined time for an installation.
eg...
1, Splash page is shown (in browser).
2, User chooses option which takes them to external website.
3, Either :-
a, If user ceases interaction for set amount of time, browser automatically reloads splash page. (preferable option)b, After a fixed set amount of time, browser automatically reloads splash page.
The problem exists because i do not have access to the source code of the websites that the splash plash page links to...
Would a windows based script be the way forward or some sort of frame with a javascript timer??
Really stuck on this, any help or working examples really appreciated, thanks in advance...
- appalled0
<META HTTP-EQUIV="Refresh" CONTENT="2;URL=http://url.whatever">
- waits then loads link if no action takenappalled
- Where would that go? I only have access to the source of the splash.Sneakybadger2
- Ah i see, in a frame?Sneakybadger2
- <head> in here </head>appalled
- no frames neededappalled
- Sneakybadger20
^ Sorry, not sure if i follow. May have gotten the wrong end of the stick but wouldn't that code have to go on the target pages? I don't have access to those. Thats why i asked about putting it in a frame that loads the target website inside it? Thanks
- appalled0
that code goes on any page and will redirect whether or not there is activity anyway...
you might try this
http://www.codeave.com/javascrip…- Cool, i follow that but my main issue is i don't have access to the source code of the target pages.Sneakybadger2
- Thanks though, you're code has got me half way there :)Sneakybadger2
- monNom0
1. open the destination page in a frame/iframe, within the splash page,this allows you to have a timer running on the splash page and listen for events broadcast from the frame/iframe.
2. open the desintation page in a new window and use the session storage variable to listen for events from the destination page (only works in modern browser under same domain)
3. you might be able to use something like a 'bookmarklet' to append a script the the page in question. Not sure if this works though
- Nice, thanks. Number 1 sounds like a good option. Will give it a go!Sneakybadger2
- monNom0
^ ie. when you link to the page you wrap it with a javascript that will append a script node to that destination page.