Hello, everyone.
I'm working with AJaX as a beginner and could use some advice.
I've got a page with a "header" DIV, and two IFRAME columns under it. The DIV contains a form that I am attempting to submit via AJaX, but I would like the results to appear in the left IFRAME column. How do I get the AJaX to make the results appear in the IFRAME?
Unfortunately, where I work is a very secure environment and I cannot copy/paste code, here. I'll try to give an idea of what I have:
Code:
function ajaxGet() {
function ajaxReq() {
if window.ActiveXObject - return new ActiveXObject
else if window.XMLHttpRequest - return new XMLHttpRequest
else return false
}
myajaxrequest = new ajaxReq();
myajaxrequest.onreadystatechange = function() {
if all is well
-- HERE is where I don't know how to get results to iframe
}
myvar = document.getElementById("thisField").value;
myvar = encodeURIComponent(myvar);
myajaxrequest.open("GET","file.cfm?value=" + myvar, true);
myajaxrequest.send(null);
}
Thoughts?
Thank you,