Opera/Chrome & Prototype 1.6.1RC
The symptoms of this problem are noticeable in Opera and Chrome. i
have a table, and the first cell of each row is observing "click" to
perform an Ajax call and get a sub-table: a primitive tree-grid
structure.
Works fine in Firefox & IE. i'm using Opera 10 (just updated to 10
beta) to debug, and here's what i'm finding:
getLots:function(itemid){
var row2 = $('i2[' + itemid + ']');
if (row2.down('table')) {
...
}
new Ajax.Request( ... );
}
This function is executing as expected, so the cells are observing
correctly. However, it appears Opera is not fully extending the HTML
Element on the line
var row2 = $('i2[' + itemid + ']');
unless Dragonfly just isn't reporting the Prototype extended methods.
Here's what Dragonfly shows for "row2" after the assignment:
row2 object
childElementCount: 2
+ firstChild: object
+ firstElementChild: object
id: "i2[48989]"
innerHTML: "<TD> </TD><TD colspan="3" id="il[48989]"...
innerText: " "
+ lastChild: object
+ lastElementChild: object
+ nextElementSibling: object
+ nextSibling: object
+ offsetParent: object
outerHTML: "<TR id="i2[48989]" style="display:none;"><T...
outerText: " "
+ parentElement: object
+ parentNode: object
+ previousElementSibling: object
+ previousSibling: object
rowIndex: 3
sectionRowIndex: 1
sourceIndex: 200
text: " "
textContent: " "
The inspection of the same object in Chrome is similar: showing the
native properties and methods, but none of the Prototype extensions.
So clearly, Prototype $() is returning an HTMLElement. But my function
blows up on the IF statement. The function doesn't skip the IF
statement to the Ajax call as though it evaluated False and moved on,
it just dies on that line.
Chrome throws "Uncaught Error: SYNTAX_ERR: DOM Exception 12" and
traces the error to prototype.js line 3339:
Selector#findElements:
results = $A(root.querySelectorAll(e)).map(Element.extend);
Any help?
-joe t.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Prototype & script.aculo.us" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---