Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Web Programming > JavaScript > Javascript
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
Javascript General Javascript discussions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old August 8th, 2007, 03:23 PM
Authorized User
Points: 101, Level: 2
Points: 101, Level: 2 Points: 101, Level: 2 Points: 101, Level: 2
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2007
Location: , , .
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
Default XMLHttpRequest.open

This might have been answered already...

I am using a script to call an RSS feed from a website...and displaying them to an html page. This works fine in IE however in FireFox I get the following error

Error: uncaught exception: Permission denied to call method XMLHttpRequest.open

This prevents cross domain scripting....This I know...

Is there a work around or a solution to get this page to work in FF?

Thanks

Reply With Quote
  #2 (permalink)  
Old August 9th, 2007, 02:44 AM
joefawcett's Avatar
Wrox Author
Points: 9,763, Level: 42
Points: 9,763, Level: 42 Points: 9,763, Level: 42 Points: 9,763, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Exeter, , United Kingdom.
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

IE also disallows cross domain scripting so this shouldn't be the problem. Are the two domains different? Are you passing an argument to the send method? Firefox won't accept passing no value.

--

Joe (Microsoft MVP - XML)
Reply With Quote
  #3 (permalink)  
Old August 9th, 2007, 08:48 AM
Authorized User
Points: 101, Level: 2
Points: 101, Level: 2 Points: 101, Level: 2 Points: 101, Level: 2
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2007
Location: , , .
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
Default

var url = "http://www.weather.gov/data/current_obs/KGTR.xml";
var xml = new JKL.ParseXML(url);

If you would like to see the js file let me know...or you can look at the page itself
http://portal.test.oncampus.msstate....r/weather.html
and view the source

Thanks for the help
Reply With Quote
  #4 (permalink)  
Old August 20th, 2007, 01:22 PM
Friend of Wrox
Points: 1,749, Level: 16
Points: 1,749, Level: 16 Points: 1,749, Level: 16 Points: 1,749, Level: 16
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2007
Location: San Diego, CA, USA.
Posts: 477
Thanks: 10
Thanked 19 Times in 18 Posts
Default

I get a blank page in both FF and IE7 (don't have 6 here at work). This is one of the nasty things about AJAX, when it fails it fails badly. Hope this helps you figure out the problem.

-------------------------

Whatever you can do or dream you can, begin it. Boldness has genius, power and magic in it. Begin it now.
-Johann von Goethe

When Two Hearts Race... Both Win.
-Dove Chocolate Wrapper

Chroniclemaster1, Founder of www.EarthChronicle.com
A Growing History of our Planet, by our Planet, for our Planet.
Reply With Quote
  #5 (permalink)  
Old August 21st, 2007, 02:18 AM
joefawcett's Avatar
Wrox Author
Points: 9,763, Level: 42
Points: 9,763, Level: 42 Points: 9,763, Level: 42 Points: 9,763, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Exeter, , United Kingdom.
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

As I said you can't load XML from a different domain client-side. Your feed is from a different domain to your actual site. You need to use a server-side proxy.

--

Joe (Microsoft MVP - XML)
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
IE7 native XMLHttpRequest object ChrisScott Ajax 1 November 9th, 2006 04:36 AM
XMLHttpRequest object instantiation AGS BOOK: Beginning Ajax with ASP.NET 4 September 25th, 2006 03:52 AM
using XmlHttpRequest from .pac file sergeyk BOOK: Professional Ajax ISBN: 978-0-471-77778-6 0 September 5th, 2006 12:19 PM
xmlhttprequest - mozilla alexena XML 0 August 23rd, 2006 07:16 AM
XMLHttpRequest asyncronous by default? AGS BOOK: Professional Ajax ISBN: 978-0-471-77778-6 2 June 17th, 2006 04:44 PM



All times are GMT -4. The time now is 02:04 PM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.