dG,

Okay, I tried using Troy Wolf's Proxy php page...  It's a little more
than what i needed, but it works just fine.

I think this is something with JQuery itself...  For anyone who wants
to look at this, i've uploaded it to my server:
http://ww2.krushradio.com/test/yp/jquery.zip

Now... I wanted to test this to see what exactly is the difference,
and find out if jquery is timing out, or if it's not waiting

First, I tested the proxy to make sure that it's reading the file
correctly...
http://ww2.krushradio.com/test/yp/2/proxy.php?proxy_url=http://yp.krushradio.com/getstream.aspx?stream=stream
Which it is.. that pulls in the correct xml document.. which I've also
used as just krush.xml  (http://ww2.krushradio.com/yp/1/krush.xml)

So, I built 2 versions of it, one that pulls the xml from the server
which is live, and 1 that uses the xml from file..
http://ww2.krushradio.com/test/yp/1/index.html   and
http://ww2.krushradio.com/test/yp/2/index.html

The one with the flat file works fine, and does what it should.  The
other one, does not work..   Technically, the same xml file is being
fed to both using the proxy.php file.  So, i'm at a loss... Is there a
wait function that it needs to use... which is what i thought the $
(document).ready(function(){  line is for..

So, i'm on the right track.. it just seems that i'm missing something.

Any thoughts?

~Doc





On Feb 27, 10:31 am, deafGuru <b...@deafcensus.org> wrote:
> Type 'cross domain XML with ajax' in the search field. You will find
> an excellent answer to common problem. Last night it was first time it
> worked magically. If you have own website, you just call "proxy.php"
> in which it calls another domain for XML document, receives and wraps
> it, and return it to your JQuery script for processing.
>
> Firebug would likely tell you it's ACCESS TO RESTRICTED URI error due
> to browser security. Using proxy solves it! Be forewarned that using
> proxy lures great dangers!!!
>
> On Feb 27, 5:24 am, Dor <dor9...@gmail.com> wrote:
>
>
>
> > Is that your website?
>
> > It might be that on the server side, the access to some pages are not
> > allowed if the HTTP_REFERER header is from another website.
> > Try to set the HTTP_REFERER of the AJAX request to an empty string.
>
> > On Feb 27, 6:19 am, KrushRadio - Doc <drega...@gmail.com> wrote:
>
> > > Hey guys,
>
> > > I'm a bit new to JQuery, but from what i've read, it's the end all to
> > > xmlhttprequests.
>
> > > I pulled this from a website and modified it to work on mine.  I'm
> > > using jQuery 1.3.2, btw...
> > > For the life of me, i cannot get it to pull the xml data from
> > > getstream.aspx.  if you open it up in a browser, it shows as perfect
> > > xml.  If i parse it with straight php, it works, but i want to use the
> > > jQuery Library with an ajax refresh.
>
> > > Am I screwing something up, or is there something I don't know about
> > > when using a website source vs. a local source.
>
> > > ~Doc
>
> > > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
> > > "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
> > > <html xmlns="http://www.w3.org/1999/xhtml";>
> > > <head>
> > >         <meta http-equiv="Content-Type" content="text/html; 
> > > charset=UTF-8" />
> > >         <link rel="stylesheet" type="text/css" media="all" 
> > > href="style.css" /
>
> > >         <script type="text/javascript" src="jquery.js"></script>
> > >         <title>Reading XML with jQuery</title>
> > >      <script>
> > >         $(document).ready(function(){
> > >                         $.ajax({
> > >                                 type: "GET",
> > >                                 url: 
> > > "http://yp.krushradio.com/getstream.aspx?stream=stream";,
> > >                                 dataType: "xml",
> > >                                 success: function(xml) {
> > >                                         
> > > $(xml).find('activesong').each(function(){
> > >                                                 var stream = 
> > > $(this).find('servername');
> > >                                                 var title = 
> > > $(this).find('songname').text();
> > >                                                 var genre = 
> > > $(this).find('servergenre').text();
> > >                                                 $('<div 
> > > class="TrackListing"></div>').html(stream+'<br>'+title
> > > +'<br>'+genre+'<br>').appendTo('#page-wrap');
> > >                                         });
> > >                                 }
> > >                         });
> > >                 });
> > >      </script>
> > > </head>
> > > <body>
> > >         <div id="page-wrap">
> > >         <h1>Reading XML with jQuery</h1>
> > >      </div>
> > > </body>
> > > </html>- Hide quoted text -
>
> - Show quoted text -

Reply via email to