HTML Logo by World Wide Web Consortium (www.w3.org). Click to learn more about our commitment to accessibility and standards.

Moving forward with Composr

ocPortal has been relaunched as Composr CMS, which is now in beta. ocPortal 9 will be superseded by Composr 10.

Head over to compo.sr for our new site, and to our migration roadmap. Existing ocPortal member accounts have been mirrored.


How to refresh a miniblock?

Login / Search

 [ Join | More ]
 Add topic 
Posted
Rating:
#111050 (In Topic #22306)
TQ
Avatar

Honoured member

Hi,

I have a miniblock on my ocP site that displays the track, artist & cover of the current song playing on my Internet radio station. It reads a data file that the station updates every new track.

I'd like to refresh the miniblock every 10 seconds which I have done on other HTML sites using JQuery to refresh a div but I can't get it working on ocP.

If I put the script on a page to refresh the div it works perfectly in 'Preview' mode but the div doesn't update on the final (saved) page. I can see the script is working using Firefox's inspector.

I'm assuming that this is the result of ocP's strict protection which I DO NOT want to diminish as the miniblock is in the RH side menu of the home page.

How then should I go about achieving what I want?

Any pointers would be much appreciated.

TQ
Back to the top
 
Posted
Rating:
#111058
Avatar

Community saint

<span http-equiv="refresh" content="10"> might work. If not, it may work inside a frame. Or it might not work at all. Just an idea :P
Back to the top
 
Posted
Rating:
#111059
Avatar

Community saint

Hmm for some reason it keeps changing meta to span, so change that span to meta.
Back to the top
 
Posted
Item has a rating of 5 (Liked by KingBast)  
Rating:
#111078
TQ
Avatar

Honoured member

Sorted. Had the div/script in the wrong order (couldn't see the wood for the trees!)

Tnx for your feedback

TQ

Back to the top
 
1 guests and 0 members have just viewed this: None
Control functions:

Quick reply   Contract

Your name:
Your message: