Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    Regular Coder
    Join Date
    Jun 2002
    Location
    Adirondacks
    Posts
    516
    Thanks
    4
    Thanked 4 Times in 4 Posts

    Parsing RSS permission denied error

    Script is from O'Reilly's site I adjusted/changed VERY little
    It works fine on my computer
    Uploaded to my host-
    I get "permission denied" on line 186 in IE
    In Firefox I just get no action whatsoever, the script does nothing
    So....rolling with IE since the error is something tangible to work with in this instance

    HTML
    http://www.footballhangout.com/Players/rssajax2.html
    There "can't" be anything wrong here, I mean there's just nothing to that. I changed from drop down box to input box otherwise...real vanilla there.

    Javascript
    http://www.footballhangout.com/Players/rssajax3.js
    I figure it's gotta be here, the error.

    I changed the 4th or 5th line to
    Code:
    var rssurl = "http://news.search.yahoo.com/news/rss?p=" + document.rssform.rssfeed.value +"&ei=UTF&fl=0&x=wrt";
    and the 186th line to
    Code:
    xhr.open("GET","http://news.search.yahoo.com/news/rss?p=" + document.rssform.rssfeed.value +"&ei=UTF&fl=0&x=wrt",true);
    The change I did is the preceding URL part, previously it fetched document.rssform.rssfeed.value, and the mine type(?) following stuff.

    all the other lines are the same

    "permission denied", no clue what that means here. Yahoo and Google invite folks to fetch their feeds so it's not that. I'm working within my own site(js) so....where's the prob here? I'm baffled, any ideas?

    ETA: Original article link
    http://www.xml.com/pub/a/2006/09/13/...er.html?page=1
    Last edited by FJbrian; 06-06-2007 at 04:37 AM.

  • #2
    Senior Coder
    Join Date
    Sep 2005
    Posts
    1,791
    Thanks
    5
    Thanked 36 Times in 35 Posts
    you can't do cross-domain requests with javascript, you'd need to proxy the request with a script on the same domain
    My thoughts on some things: http://codemeetsmusic.com
    And my scrapbook of cool things: http://gjones.tumblr.com

  • #3
    Regular Coder
    Join Date
    Jun 2002
    Location
    Adirondacks
    Posts
    516
    Thanks
    4
    Thanked 4 Times in 4 Posts
    Thanks for the reply
    I was searching via google late last night and I actually came back to here and saw a post by David KW stating as such and suggesting Google's API. I'm looking at that now. Quite candidly why's that work then?
    http://code.google.com/apis/ajaxfeeds

    see
    http://code.google.com/apis/ajaxfeeds/documentation/
    they're using javascript(JSON) so I'm a little confused

    Is what you're saying true or not then?(not accusational, looking for info is all, much thanks for the reply) Seems like others say exactly what you just did yet, I see google's code using javascript to do it. Please clarify

  • #4
    Senior Coder A1ien51's Avatar
    Join Date
    Jun 2002
    Location
    Between DC and Baltimore In a Cave
    Posts
    2,717
    Thanks
    1
    Thanked 94 Times in 88 Posts
    You can link to an external JavaScript file which JSON is. You can not link to any other type of file. The JSON request is done by injecting a script tag onto the page and reading the value. I have an example on my blog here: http://radio.javaranch.com/pascarell...292250518.html

    If you want to use XML, HTML, text from another domain, you need to use a proxy as dicussed above.

    Eric
    Tech Author [Ajax In Action, JavaScript: Visual Blueprint]

  • #5
    Regular Coder
    Join Date
    Jun 2002
    Location
    Adirondacks
    Posts
    516
    Thanks
    4
    Thanked 4 Times in 4 Posts
    I don't really understand that blog post Eric
    What's instance call back? Didn't you just use yahoo api instead of google api?


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •