• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Prototype.js and firefox

 
Sheriff
Posts: 7001
6
Eclipse IDE Python C++ Debian Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I've been playing with some Ajax recently, particularly the apparently well-liked "prototype.js". The prototype website seems to have no docuumentation at all, so I have been working through the tutorial at http://www.sergiopereira.com/articles/prototype.js.html

It all seems to work fine with Internet Explorer, but so far I get nothing at all (not even error messages on the Javascript console) when I try even simple pages in Firefox.

Is this a known problem? I know I have used AJAX-style sites from Firefox in the past, and I had hoped that one of the things that prototype.js would offer is a path through the maze of browser incompatibility.

Or does it work for everyone else, and I have just somehow screwed up my Firefox installation?

A simple example of what I'm testing is:



(note I had to change the onclick to onxlick to post this message. Please switch it back befor etrying this out.)

in IE, when I click the button, it shows some HTML from the remote site.

in Firefox, nothing happens.

Help!
[ November 22, 2005: Message edited by: Frank Carver ]
 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm assuming the "onxlick" should be "onclick" and you mistyped that.

One thing to check is to see if the requested resource is being served as text/xml. And, another thing to check is to make sure you can access the XML file at all with Mozilla.

You might try an alternate library for making the XML request as well, to see if this is an issue with prototype.js, an issue with your implementation of prototype, or an issue with your XML file.
 
author and iconoclast
Posts: 24207
46
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Works for me (Firefox 1.0.7, Linux), but only if the fetched file and this file come from the same place, as required by the security model. Not at all surprising that IE's security is lax compared to FF's! Anyway, try putting the HTML on http://www.efsol.com/, or use a local file (i.e., "index.html") as the target.
 
Frank Carver
Sheriff
Posts: 7001
6
Eclipse IDE Python C++ Debian Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Ernest, that was exactly it.

I had read a bunch of hype about AJAX but never encountered anything saying that the html and the remote resource have to be from the same site. Now, I discover that it is mentioned in the tutorial I was using, but only as a side note buried in a table of method descriptions.

Kind of limits what I was hoping to do. I guess it means I'll be setting up some sort of HTTP tunnel/proxy alongside the more active parts of the serverside application.

Oh well.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic