Well I did hack it to make it work, but I'd still like to fix it... basically all I did was to replace the "return" statement with this, doing a direct assignment of the value rather than returning it to the calling function:
var subobj=document.getElement
subobj.innerHTML = (myajax.responseText);
I did that because, yes, I had done exactly as you suggested by hard-coding a string in there, so I KNEW that I was close!
Maybe that function's not returning a string, but maybe an object instead?
Main Topics
Browse All Topics





by: b0lsc0ttPosted on 2007-02-19 at 15:48:10ID: 18567354
Let's try to narrow down the problem. In the alert did you have it show the responseText and see it or was it some other response?
If it is responseText then try sending it to the div from this function. Does that work? Instead of using responseText in the other function that is writing to innerHTML try writing a string. For example ...
divname.innerHTML = 'This is a test string';
Does that appear? If not, then this function is the problem and there is no problem with the AJAX script. These steps will help us narrow down the problem. Please show the html and script that is relevant.
As you do this remember that Javascript is case sensitive and look for Javascript errors. Also what browser are you using? These last tips may help you identify the problem as you work on my comment.
Let me know if you have a question or need more information.
bol