I’m trying to come up with what is probably a kludge. What I’d like to do is take the responseText from an AJAX request — which will be a full HTML page — and parse it first to find if there is a <form>…</form> in it. If not I’ll display a success message and all is fine, but if it’s there, then I want to extract just that form section and display it within a <div> in the page.
This is where my JS skills are failing me. Can anyone point me to the applicable functions, tutorial, or whatever that would show me how to find the <form> and extract it and then replace my div contents with it (just innerHTML?).
Help @NogDog spread the word by sharing this article on Twitter...Tweet This