The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
![]()
is it possible to reload a specific sidebar block only instead of the whole page?
here is the code I'm using currently: <form><input type="image" src="/images/Refresh.png" onClick="window.location.reload()"></form> tried changing "window" to "block"...no luck also tried "block_html" and no luck...also tried "block_html_19" = div id name. all option's refresh the entire page. or is there a javascript I can use that auto-refresh's the block? or is it even possible? |
#2
|
|||
|
|||
![]()
You could try using jQuery to refresh the page or the specific block on a timer. I have done this myself with my radio site as the radio stats need to refresh every 60-80 seconds. I'll try get a hold of this code for you and let you know.
EDIT: This is the code i have, you may need to change the div ids and such, i have bolded out what needs to be changed. Code:
$(".statsrefresh").click(function(e){ var href = $(this).attr('href'); // console.log(href); // get the current contents current = $("#statscontent > include"); // this is the ul thats there now console.log(current); // jquery fails silently - so the first time this runs we should have nothing here - and thats ok if (current.length !== 0) { current .animate( {"opacity": 0}, 1000, function(){ $(this).remove(); $("#statscontent").load(href, function(){$(this).css("opacity",0).animate({"opacity":1},1000);}); }); // we fade it out and then we remove it from the DOM(page) } else { $("#statscontent").load(href, function(){$(this).css("opacity",0).animate({"opacity":1},1000);}); } e.preventDefault(); |
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|