Wrox Programmer Forums
|
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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 8th, 2007, 03:23 PM
Authorized User
 
Join Date: Jun 2007
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

 
Old August 9th, 2007, 02:44 AM
joefawcett's Avatar
Wrox Author
 
Join Date: Jun 2003
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)
 
Old August 9th, 2007, 08:48 AM
Authorized User
 
Join Date: Jun 2007
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
 
Old August 20th, 2007, 01:22 PM
Friend of Wrox
 
Join Date: Jun 2007
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.
 
Old August 21st, 2007, 02:18 AM
joefawcett's Avatar
Wrox Author
 
Join Date: Jun 2003
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)





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





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