Hi All,

I seem to be painted into a corner with use of $$ with respect to case
sensitivity of the id attribute of html elements. I get completely
opposite results between Firefox, Safari, and IE. All three work
differently. With an id such as "aBc", Firefox can only find it with $$
('#aBc') and Safari can find it only with $$('#abc'). IE finds both,
i.e. not at all case sensitive. I have a test case below - just run on
different browsers, and you will see different results.

Thanks,
--Jay

<html>
<head>
<title>test4</title>
<script src="http://ussda.demosphere.com/common/js/ps1.8.1/
prototype.js" language="JavaScript" type="text/javascript"></script>
</head>
<body>

        <table id="aBc1"> <tr> <td id="xYz1" class="De">mixed case</td> </tr>
</table>

<script type="text/javascript">
var Test$$ = {

  test: function(x){
    return '\n $$("'+x+'").length = ' + $$(x).length;
  },

  setup: function() {
    var s = navigator.userAgent + ':';
    [true,false].each(function(dcase){
      s += '\n';
      ['table#aBc1','#aBc1','table#aBc1 td.De'].each(function(x){
        if (dcase) x = x.toLowerCase();
        s += Test$$.test(x);
      })
    })
    alert(s);
  }

}

document.observe('dom:loaded', function(){
  Test$$.setup();
});

</script>

</body>
</html>


--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to