Okay, now I've got this thing I need to do with Javascript but I have no idea the best way of doing it! I'll explain by telling you how I "think" it should work...
Inside the web page there will be multiple span tag like this:
<span onload="myfunction(1);"></span>
myfunction() (hosted externally) will wait until the page finishes loading and collect all the information from each of the onload events.
Then myfunction() will send this information to a external php page for processing.
The php page will return some html. (Probably in an array because I want to do this in 1 call)
myfunction() will then replace the span tags with the html.
Steps 3, 4, and 5 I know how to do but steps 1 and 2 I'm not sure how to achieve? I've listed all my steps here just in case someone sees another big problem I might run into.