I’m trying to use an iframe to process a log in, and change the parent page depending on the output. I’ve traced the javascript to here:
function results(status)
{
req = new XMLHttpRequest();
req.open('GET', '../design/loginbox.php', false);
req.send(null);
alert(req.responseText);
top.document.getElementByID['loginbar'].innerHTML = req.responseText;
}
I know this isn’t cross compatible or anything, but at the moment I’m just testing. The alert shows the correct output, however, the parent page never changes. Can anyone see where I am going wrong?
Thanks, Piepieonline
here
getElementByIdis a method… you have to call it, not use it like an array.