Hi all,
I'm looking into this since some hours, finished to decide to ask some real developpers around :)
My problem is simple, I'd like to refresh a div in some part of a elgg site.
Like every 3min. I don't want to reload the whole page, just my <div id=some div>.
Problem is my div is part of some custom code, which is called in another code which added an elgg_extend_view of a elgg_view (page/elements/sidebar).
So I was wondering if with elgg 1.8 there is some function already available to refresh a elgg_view ?
I think jquery has already some, but no idea how to call the refresh.
Thx for your kind returns if any :)
info@elgg.org
Security issues should be reported to security@elgg.org!
©2014 the Elgg Foundation
Elgg is a registered trademark of Thematic Networks.
Cover image by RaĆ¼l Utrera is used under Creative Commons license.
Icons by Flaticon and FontAwesome.
- Damned@damned
Damned - 0 likes
- DhrupDeScoop@Dhrup2000
DhrupDeScoop - 0 likes
- Kevin Jardine@kevin
Kevin Jardine - 0 likes
- DhrupDeScoop@Dhrup2000
DhrupDeScoop - 0 likes
- Kevin Jardine@kevin
Kevin Jardine - 0 likes
- DhrupDeScoop@Dhrup2000
DhrupDeScoop - 0 likes
- Damned@damned
Damned - 0 likes
You must log in to post replies.It's alright, managed differently.. :)
But if someone knows a fonction for this, please don't hesite to comment here :)
With your Target-DIV, some straight forward jQuery
to manage the AJAX content stuff should work
enveloped in a JS setTimeout()
:-
var LoadDivData = $.ajax({
url: "Your-View-Ajax-End-Point.php",
data: "...ETC",
async: false
}).responseText;
$("#TARGET-DIV").html(LoadDivData);
. . .
Or you could just use load and Elgg's page handler to get cleaner URLs:
$("#target-div").load(elgg.get_site_url()."myplugin/endpoint/"+value1+"/"+value2);
@Kev: hmm.. ;-) (lazy ole man here.. lolz) never too old to learn/re-learn/revize ;-P ThX.. are value1 etc just parms for the endpoint ?
Yes.
Oki ThX x2 - I had just merely copy/paste some old-ish jquery ajax code ;-P
Thx guys for the answers, should come handy.
Managed slighty a bit differently, but I'll may rewrite the code later on :)
Btw, I'm been looking a lot on http//www.jplayer.org, if I manage to get some spare time, I'll try to make a plugin out of it with my limited php/javascript skills.