what browser are you using?
all i get back from the code is boo
also: you are missing a " in http.open("GET", "grabData.php, true);
here's the working example http://sudev.bruuuuuce.com/hrmtest.htm
On 8/24/07, junkmate <[EMAIL PROTECTED]> wrote:
>
>
> I run the following Javascript code, which calls a PHP file
> grabData.php, which contains ONLY <?php echo "boo"; ?> and the alert
> returned has an entire HTML structure with "boo" in the middle of
> it... Heres the code im using:
>
> if (navigator.appName == "Microsoft Internet Explorer") {
> http = new ActiveXObject("Microsoft.XMLHTTP");
> } else {
> http = new XMLHttpRequest();
> }
>
> http.abort();
> http.open("GET", "grabData.php, true);
> http.onreadystatechange=function() {
> if(http.readyState == 4) {
> alert(http.responseText);
> }
> }
> http.send(null);
>
>
>
> On Aug 25, 2:13 am, "Brian Williams" <[EMAIL PROTECTED]> wrote:
> > uhm, could it be that you are also echoing the header files that you are
> > including in your php?
> >
> > write a php file that has
> >
> > <? echo "boo" ?>
> >
> > and call it with your ajax and all you should get is boo
> >
> > On 8/24/07, junkmate <[EMAIL PROTECTED]> wrote:
> >
> >
> >
> > > I want my AJAX responseText to return "ONLY" the data that I echo with
> > > PHP...
> > > at the moment it is returning full HTML pages, which I dont want and
> > > is making things impossible...
> >
> > > How can I strip these HTML tags out and leave just my data?
>
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---