Looking at the code, this is the line where it's erroring:
if (Prototype.BrowserFeatures.XPath) {
document._getElementsByXPath = function(expression, parentElement) {
var results = [];
var query = document.evaluate(expression, $(parentElement) ||
document,
null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null); //////
ERROR /////
for (var i = 0, length = query.snapshotLength; i < length; i++)
results.push(Element.extend(query.snapshotItem(i)));
return results;
};
}
This doesn't error in newer versions of firefox 3.0, 3.1 beta, but as
a result, after this exception is thrown I can't use any other
protoype javascript on the page (or any jquery, because the noconflict
fails).
> Looking at the code, this is the line where it's erroring:
> if (Prototype.BrowserFeatures.XPath) {
> document._getElementsByXPath = function(expression, parentElement) {
> var results = [];
> var query = document.evaluate(expression, $(parentElement) ||
> document,
> null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null); //////
> ERROR /////
> for (var i = 0, length = query.snapshotLength; i < length; i++)
> results.push(Element.extend(query.snapshotItem(i)));
> return results;
> };
> }
> This doesn't error in newer versions of firefox 3.0, 3.1 beta, but as
> a result, after this exception is thrown I can't use any other
> protoype javascript on the page (or any jquery, because the noconflict
> fails).
> Is this a bug in firefox or in prototype?
I can not reproduce this with trunk version of prototype and
FF2.0.0.20 on MacOSX.
Do you use both prototype, and jquery on the same page? Probably that
might be the problem.
I use prototype 1.6.1_rc2 on Windows XP FF 2.0.0.20
There is no such error.
On Jun 12, 10:00 pm, swindsor <swind...@gmail.com> wrote:
> Looking at the code, this is the line where it's erroring:
> if (Prototype.BrowserFeatures.XPath) {
> document._getElementsByXPath = function(expression, parentElement) {
> var results = [];
> var query = document.evaluate(expression, $(parentElement) ||
> document,
> null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null); //////
> ERROR /////
> for (var i = 0, length = query.snapshotLength; i < length; i++)
> results.push(Element.extend(query.snapshotItem(i)));
> return results;
> };
> }
> This doesn't error in newer versions of firefox 3.0, 3.1 beta, but as
> a result, after this exception is thrown I can't use any other
> protoype javascript on the page (or any jquery, because the noconflict
> fails).
I had the very same problem and solved it by changing the order:
1) include jquery
2) setting jQuery.noConflict().
3) include prototype & scriptaculous
On 13 Jun., 04:00, swindsor <swind...@gmail.com> wrote:
> Looking at the code, this is the line where it's erroring:
> if (Prototype.BrowserFeatures.XPath) {
> document._getElementsByXPath = function(expression, parentElement) {
> var results = [];
> var query = document.evaluate(expression, $(parentElement) ||
> document,
> null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null); //////
> ERROR /////
> for (var i = 0, length = query.snapshotLength; i < length; i++)
> results.push(Element.extend(query.snapshotItem(i)));
> return results;
> };
> }
> This doesn't error in newer versions of firefox 3.0, 3.1 beta, but as
> a result, after this exception is thrown I can't use any other
> protoype javascript on the page (or any jquery, because the noconflict
> fails).
> I had the very same problem and solved it by changing the order:
> 1) include jquery
> 2) setting jQuery.noConflict().
> 3) include prototype & scriptaculous
> On 13 Jun., 04:00, swindsor <swind...@gmail.com> wrote:
> > Hey all,
> > I'm running into a pretty severe bug with protoype 1.6 (and 1.5) with
> > firefox 2.0.0.20
> > When prototype loads, I get the following javascript error:
> > This doesn't error in newer versions of firefox 3.0, 3.1 beta, but as
> > a result, after this exception is thrown I can't use any other
> > protoype javascript on the page (or any jquery, because the noconflict
> > fails).
> Thanks, I am using jquery. I'll give this a try!
> - scott
> On Jun 24, 7:17 am, upi <teich...@gmx.de> wrote:
> > I had the very same problem and solved it by changing the order:
> > 1) include jquery
> > 2) setting jQuery.noConflict().
> > 3) include prototype & scriptaculous
> > On 13 Jun., 04:00, swindsor <swind...@gmail.com> wrote:
> > > Hey all,
> > > I'm running into a pretty severe bug with protoype 1.6 (and 1.5) with
> > > firefox 2.0.0.20
> > > When prototype loads, I get the following javascript error:
> > > This doesn't error in newer versions of firefox 3.0, 3.1 beta, but as
> > > a result, after this exception is thrown I can't use any other
> > > protoype javascript on the page (or any jquery, because the noconflict
> > > fails).