anyway...
Heres my code
function verify()
{
// 0 Object is not initialized
// 1 Loading object is loading data
// 2 Loaded object has loaded data
// 3 Data from object can be worked with
// 4 Object completely initialized
if (xmlDoc.readyState != 4)
{
return false;
}
}
function requesting(location) {
if (window.XMLHttpRequest){xhttp=new XMLHttpRequest();}
else { xhttp=new ActiveXObject("Microsoft.XMLHTTP"); }
xhttp.onreadystatechange=verify;
xhttp.open("GET",location,false);
xhttp.send(null);
return xhttp.responseXML;
}
Now, this works fine with XML on my server... but when I try to get
things from google like...
var starter = "http://gdata.youtube.com/feeds/api/users/";
var ender = "&key=devkeyyousillygooses"
function loaduzerz(){
var xmlDoc = requesting(starter+"FightClubVG/subscriptions?
v=2"+ender);
var elvid=xmlDoc.getElementsByTagName("feed")[0].getElementsByTagName
("entry");
var tooser;
for(x in elvid){
alert(elvid[x].getElementsByTagName("yt:username")[0].childNodes
[0].nodeValue);
}
}
I get a "Uncaught Error: NETWORK_ERR: XMLHttpRequest Exception 101"
I don't understand what I'm doing wrong : /
Thanks,
Monsur
At least I know XMLHTTPRequest's don't work cross domain
I'm going to see if I can just take out the functions from the google
API because I don't want to have to mess with it
I appreciate the response
A google for "javascript cross-site ajax" should turn up several
possible solutions for you to try.
Robert
> --
> You received this message because you are subscribed to the Google Groups "Google Data Javascript Client" group.
> To post to this group, send email to google-data-ja...@googlegroups.com.
> To unsubscribe from this group, send email to google-data-javascri...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/google-data-javascript-client?hl=en.
>
>
>
>
And then being able to assign the variable can be done through this
http://www.webmaster-talk.com/php-forum/20054-how-do-i-assign-javascript-variable.html
I want to be getting as nitty gritty as I can without getting too
intimidated
I think This is a great start to start calling PHP functions through
Javascript since I've done that sort of thing before and I already
need to make a Post Request with php so it saves a lot of work : )
I appreciate the help though, many coding forums are silent when it
comes to things like this,
I'm happy that someone was able to give me feedback
:D
On Jan 20, 10:05 pm, Peacemaker <samto...@gmail.com> wrote:
> Yeah, I saw Ajax.
> But again, I don't want to start using Tons of different Libraries...
> But I did find out it can just be done in PHP which is no issue for mehttp://developer.yahoo.com/javascript/samples/proxy/php_proxy_simple.txt
>
> And then being able to assign the variable can be done through thishttp://www.webmaster-talk.com/php-forum/20054-how-do-i-assign-javascr...