Fork me on GitHub

#1 2015-08-17 23:46:52

Wolfy
Member
Registered: 2015-05-12
Posts: 313

autorefreshing a frame

If you need an iframe to refresh itself periodically, have I got half a solution for you.

This code works in eyeWeather to update the frame every hour.

http://pastebin.com/2HDzJgwk

This code updates the Quote of the Day frame every 24 hours just fine, but I had to completely recode this module, and the quote doesn't ever actually load anymore.  I only get the background image now.

http://pastebin.com/p6ghGvGZ

The key difference here seems to be that eyeWeather is calling an html file (works fine), and Quote of the Day is calling a js file (no go).  I tried lots of things last night, including the eyex functions, rawjs, runjs and loadscript, for varying degrees of repeated failure.  The closest I got was revealing the javascript source, but I think all I did was remove the type=text tag, but really not sure.

Last edited by Wolfy (2015-08-17 23:54:06)


Wolfy
https://www.facebook.com/groups/oneye/
Currently accepting new users...  http://www.OS1.hawkwolf.net
onEye admins: OS1 is a beta testing hotbed. Non-core apps available upon request.

Offline

#2 2015-08-18 01:07:24

Wolfy
Member
Registered: 2015-05-12
Posts: 313

Re: autorefreshing a frame

updated my code fragment but it still doesn't work.  side note:  I was able to add a background color to eyeWeather.


Wolfy
https://www.facebook.com/groups/oneye/
Currently accepting new users...  http://www.OS1.hawkwolf.net
onEye admins: OS1 is a beta testing hotbed. Non-core apps available upon request.

Offline

#3 2015-08-18 04:23:37

Wolfy
Member
Registered: 2015-05-12
Posts: 313

Re: autorefreshing a frame

Aha, I got the Quote of the Day to load and autorefresh every 24 hours. I had to break part of it off to another html file and load it in that way.

Last edited by Wolfy (2015-08-18 04:23:52)


Wolfy
https://www.facebook.com/groups/oneye/
Currently accepting new users...  http://www.OS1.hawkwolf.net
onEye admins: OS1 is a beta testing hotbed. Non-core apps available upon request.

Offline

#4 2015-08-18 07:51:18

Wolfy
Member
Registered: 2015-05-12
Posts: 313

Re: autorefreshing a frame

I shortened refresh times to half an hour on the weather and 12 hours on the Quote of the Day.  I'm still having one nagging little problem with eyeWeather. The external code that is inserted into the iFrame starts out perfectly positioned within the frames and window, but when it autorefreshes, it drifts off to the right.  I haven't left it running long enough yet to see if it will keep drifting each time until the app is unusable.  I tried using align=left tag in the iframe statement. but it still drifts off the right.  I thought there was another similar tag that specifically aligns the frame src, but I couldn't find it when I went to look for a fix.


Wolfy
https://www.facebook.com/groups/oneye/
Currently accepting new users...  http://www.OS1.hawkwolf.net
onEye admins: OS1 is a beta testing hotbed. Non-core apps available upon request.

Offline

Board footer

Powered by FluxBB