See the small demo below. On Opera 9.22, the read attribute method
returns the attribute that is (unexpectedly) prefixed with a pathname
(in my case ''http://zeus.dev.where2getit.com/slippymap/read'').
On all other browsers the returned attribute is ''read''. is
this a bug
or am I doing something wrong?
<html>
<head>
<script type="text/javascript"
src="/w2gi/javascript/prototype.js"></
script>
<script>
function init() {
Event.observe($(''container''), ''click'',
function(event) {
event.stop();
var element = Event.element(event);
alert(''tagName: '' + element.tagName);
var action = element.readAttribute(''action'');
alert(''action: '' + action);
});
}
</script>
</head>
<body onload="init()">
<div id="container">
<div id="test" action="read">Test</div>
</div>
</body>
</html>
Thx,
Les
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Spinoffs" group.
To post to this group, send email to
rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---
fearphage-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2007-Aug-15 22:32 UTC
Re: Prototype 1.6 RC - read attribute problem on Opera
This is an Opera bug. I reported it as #278420. On Aug 15, 3:05 pm, Les <les.szkla...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> See the small demo below. On Opera 9.22, the read attribute method > returns the attribute that is (unexpectedly) prefixed with a pathname > (in my case ''http://zeus.dev.where2getit.com/slippymap/read''). > > On all other browsers the returned attribute is ''read''. is this a bug > or am I doing something wrong? > > <html> > <head> > <script type="text/javascript" src="/w2gi/javascript/prototype.js"></ > script> > <script> > function init() { > Event.observe($(''container''), ''click'', function(event) { > event.stop(); > var element = Event.element(event); > alert(''tagName: '' + element.tagName); > var action = element.readAttribute(''action''); > alert(''action: '' + action); > }); > } > </script> > </head> > <body onload="init()"> > <div id="container"> > <div id="test" action="read">Test</div> > </div> > </body> > </html> > > Thx, > Les--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---