MyBB Community Forums

Full Version: Ajax Question
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Ok, I've just started to learn JavaScript, Ajax, etc... so keep the snide comments to a minimum Wink

Before I try and do anymore with my plugin I want to know if this is valid for an Ajax Request, namely the OnComplete portion.

I've changed a few names to avoid giving away what the plugin is, as this is a surprise Smile

new Ajax.Request('xmlhttp.php?action=my_plugin_xml, {method: 'get', onComplete: document.getElementById("test").innerHTML=request.responseText }});
Not sure, but you could pass a function where you'd run that line of code.
Have you tried that? Firebug would give an error if that's not valid
Thanks Pirata, I know I can do that. I also realized I'm missing the semi-colon on the inside of it. I think it'll work, but I figured I'd ask instead of trying to test it Wink

Oh well, if I don't have a yes/no answer by when I get on tomorrow, I'll just try it Smile
What was the answer?
I never got an answer, and I can't test it yet since I'm still building the rest of the app.