Posted on 2007-04-07
I'm very new to AJAX and I'm trying to solve a problem that is probably pretty simple...
Sometimes I need a script to run based on a response I get from an HTTP request. I've thought of a lot of ways to do this programmatically by looking at the XML response. However, I've found a very simple way to do this using a regular HTML response.
In my response, I add a single-pixel image that has a randomly generated name (to prevent caching) that looks something like this:
This works like a charm in IE 6+, FireFox 1.5+, and Safari. But for some reason Opera doesn't want to do that scrip on load.
So, my question is how can I get this to work in Opera? I'm open to a solution that uses my image idea, but I realize that the image idea may not be the best way so I'm also open to another solution.
Keep in mind, the goal is to make this very easy. I don't really want to have to parse commands out of an XML response or anything like that. The goal is to have a script run based on a regular HTML response that is rendered into my website HTML.