I have tried your example code and there was no error but the $content value is:
... </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().
No friends yet.