D'oh! That was the trick. Opera and Chrome are even STRICTER about
DOM. Which is cool.

Now to examine the rest of my code for other such violations (of which
i'm sure there are many).

Thanks!
-joe

On Jun 3, 5:45 pm, "T.J. Crowder" <t...@crowdersoftware.com> wrote:
> Hi Joe,
>
> This may not have any bearing on your problem, but I'll ask anyway:
> Are you sure those are valid IDs?  Because my read of the spec is that
> [ and ] are not valid in HTML element identifiers.  The "id" attribute
> [1] is of type "name"[2], which "...must begin with a letter ([A-Za-
> z]) and may be followed by any number of letters, digits ([0-9]),
> hyphens ("-"), underscores ("_"), colons (":"), and periods (".")."
>
> [1]http://www.w3.org/TR/REC-html40/struct/global.html#h-7.5.2
> [2]http://www.w3.org/TR/REC-html40/types.html#type-name
>
> Does the problem still happen if you stick to IDs fitting the rules
> above?
>
> FWIW,
> --
> T.J. Crowder
> tj / crowder software / com
> Independent Software Engineer, consulting services available
>
> On Jun 3, 4:32 pm, "joe t." <thooke...@gmail.com> wrote:
>
> > 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 prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to