Go Back   CodingForums.com > :: Client side development > JavaScript programming > Ajax and Design

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 06-06-2007, 04:33 AM   PM User | #1
FJbrian
Regular Coder

 
Join Date: Jun 2002
Location: Adirondacks
Posts: 516
Thanks: 4
Thanked 4 Times in 4 Posts
FJbrian is on a distinguished road
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
__________________
FootballHangout.com

Last edited by FJbrian; 06-06-2007 at 04:37 AM..
FJbrian is offline   Reply With Quote
Old 06-06-2007, 08:03 AM   PM User | #2
GJay
Senior Coder

 
Join Date: Sep 2005
Posts: 1,791
Thanks: 5
Thanked 36 Times in 35 Posts
GJay is on a distinguished road
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
GJay is offline   Reply With Quote
Old 06-06-2007, 01:16 PM   PM User | #3
FJbrian
Regular Coder

 
Join Date: Jun 2002
Location: Adirondacks
Posts: 516
Thanks: 4
Thanked 4 Times in 4 Posts
FJbrian is on a distinguished road
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
__________________
FootballHangout.com
FJbrian is offline   Reply With Quote
Old 06-06-2007, 03:02 PM   PM User | #4
A1ien51
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
A1ien51 will become famous soon enough
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]
A1ien51 is offline   Reply With Quote
Old 06-06-2007, 05:44 PM   PM User | #5
FJbrian
Regular Coder

 
Join Date: Jun 2002
Location: Adirondacks
Posts: 516
Thanks: 4
Thanked 4 Times in 4 Posts
FJbrian is on a distinguished road
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?
__________________
FootballHangout.com
FJbrian is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 08:36 PM.


Advertisement
Log in to turn off these ads.