There was a typo in the JS on that page, but I corrected it and tried this example and it's working for me.
Probably what's happening is that you're outputting the JS too early in the script. You need to output it after Elgg's JS engine has been fully loaded. Can you show us your code?
Thanks, Brett.
I have tried your example code and there was no error but the $content value is:
"<script type = "text/javascript" ...
... </script>", I mean, the content of the script; and the elgg_view_page displays nothing.
I have thought that maybe I don't need to use the elgg.get function, because my aim is just displaying a map showing a search results (users array). The problem is that I don't know how I should pass these results to the page where I have the script creating the map.
Sorry, my code is quite a mess to be shown at this moment. I'm still a newbie... Could you give me some tip to make this?
Thanks a lot.
I don't understand what you mean. Put the linked code into a file in Elgg's root and then browse to that file and it should output to the JS console the contents of the activity stream.
It sounds like you should just use GET parameters, and then access them in PHP with get_input().
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.