This is really bugging me no matter what I'm trying.
In javascript, I'm using the ajax.updater, and it (obviously) writes
back out to a div. I want to then compare what was echoed out into
this div (which came from the php file I listed in ajax.updater) with
a string.

test should equal "SomeString" because that is what is being echoed
out to 'testdiv', but it doesn't. Instead, when I try debugging and
display test in a div, it shows up as "undefined."

Here is example code:

function Check(){

new Ajax.Updater('testdiv','randy.php?ajax=1',
{method:'post',parameters:'somevar='+somevalue,evalScripts:false});
//wha la, testdiv now displays "SomeString". but wait! crap!.....

test = document.getElementById('testdiv').value;

if (test == "SomeString"){

document.getElementById('testdiv').innerHTML=test;
return true;
}
}

Thanks for any advice.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Spinoffs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to