...

View Full Version : Ajax Request Question



votter
08-13-2010, 10:11 PM
Hello everyone. I'm trying to use an ajax request and getElementsByTagName, like so:


function show() {
new Ajax.Request('file.php', {
method: 'get',
onSuccess: function(t) {
var test = t.getElementsByTagName('span');
alert (test.length);
}
});
}

file.php

<span>Test</span>


But it just seems to break. Thanks for your help

votter
08-14-2010, 03:51 PM
Nevermind, I'm just using xml with it now. Thanks again.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum