Displaying 20 results from an estimated 20000 matches similar to: "event.target.readAttribute undefined"
2007 Jun 01
5
il8n with Prototype
I''d be grateful for feedback regarding the following:
/* Iterate over elements and lookup translation for language in JSON
dictionary */
function translateChildren(parent, language) {
var phrases = parent.getElementsByClassName(''lang'');
phrases.each(function(p) {
var phrase = p.readAttribute(''for'');
p.innerHTML =
2006 Aug 31
2
Event.observe problem
Hi everyone!
I came across and interesting problem with prototype Event.observe.
Take this code for example:
<script type="text/javascript" src="cropper/lib/prototype.js"></script>
<script language="JavaScript"><!--
function handler(e) {
if (document.all) { e = window.event; }
var key;
if (document.layers) key = e.which;
if
2006 Oct 20
1
Event.observe vs. element.onxxx =
What are the pros and cons of using Event.observe vs. element.onxxx =
somefunction ?
I noticed that a lot of sau code doesn''t use Event.observe. For example,
InPlaceEditor uses
this.form.onsubmit = this.onSubmit.bind(this);
In my code I''ve made a habit of using the equivalent (for example):
this.onSubmitListener = this.onSubmit.bind(this);
2007 Nov 08
1
Prototype 1.6 and Lowpro 0.5
If you''re using Lowpro 0.5 from the trunk, you''ll need to append this
to fix the broken Event.onReady method:
Object.extend(Event, {
onReady : function(f) {
document.observe(''dom:loaded'', f);
}
});
Basically "contentloaded" changed to "dom:loaded" between rc0 and rc1.
Just spent all morning working this out, hopefully it will save
2006 May 03
3
My Tooltips contribution
All --
I've been working on a simple tooltip widget and thought I'd release
it into the wild. It builds on the features found in Prototype 1.5.0
RC0 and Scriptaculous 1.6.1.
Very basically, it walks down a list of links and if they have id,
href and title attributes, displays a tooltip on mouseover. Styled
with a few lines of CSS and background images.
You can demo it here:
2007 Sep 28
2
Event.observe doesn't work
Hi,
The following simple html doesn''t work with errors, why?
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN""http://www.w3.org/TR/
html4/strict.dtd">
<html>
<title>click</title> <head>
<h2>Click!</h2>
<script type="text/javascript" language="javascript">
2008 May 24
3
prototype causing value undefined error
I have a project for which I used a Wicket template as a starting
point. The original example uses prototype.js.
I''m using an SVG image as a background and have included a javascript
that causes the image to always fill the background, regardless of the
client window dimensions.
This works fine in Safari 3 (Firefox doesn''t display the background
image, but I''ll deal
2006 Jan 27
1
[prototype] [BUG] Event.stop doesn''t stop all keystrokes on some browsers
attached is an html file I used to test the bug. the top text box should not
allow you to type anything, not tab, not enter, nothing. bottom text box
should work fine.
requires prototype.js and includes jslog for jslog.info although it only
occurs in one place, I just wanted to make sure the event was firing without
having to use alerts :)
tested browsers/platforms:
opera: mac / win / lin:
2006 Nov 03
4
Bug? IE, getElementsByClassName and "length"
So, I have this form/datagrid thing. I want to have a button that
clears the fields (not a reset, which would set them to the default
state, I want them blank.) For various reasons, getByClassName seemed
the best way to deal with this.
Everything was fine on Moz/Firefox. Safari seems fine. But IE...
Some detective work later, it seems that the problem is caused by
*another* field on the page.
2007 Aug 29
0
Element.addMethods vs extending prototype.
Hi.
I''m using prototype.js V1.6.0_rc0.
I''ve successfully used Element.addMethods() to add some additional
functionality to my forms ... Element.addMethods(''FORM'', { ... });
So far so good.
I now want to add a new property to all forms.
Is there an equivalent Element.addProperty(''FORM'', { ... }); technique
I could use?
As readAttribute /
2006 Mar 03
11
event.keyCode broken in prototype?
I ran 2 tests. One using proto''s Event.observe, and another using an
in-line handler of the "keydown" event in a textbox.
Using .bindAsEventListener, the event.keyCode is always returning a
capital letter, no matter what. The in-line event handler returns
lowercase vs. uppercase correctly... What''s going on?
I guess I find it hard to believe no one has tried
2005 Nov 08
2
Scriptaculous insertion fails when XHTML Strict used in FireFox
Hi !
I'm getting an uncaught exception requiring the Scriptaculous
libraries when everything says XHTML 1.0 Strict:
class ApplicationController < ActionController::Base
before_filter :set_content_type
protected
def set_content_type
response.headers['Content-Type'] = 'application/xhtml+xml;
charset=ISO-8859-1'
end
end
<?xml version="1.0"
2007 Jun 09
23
hoverclass on droppable zone
Hi guys,
I''m trying to make a drag''n''drop portal using sortable element. I
would like to apply the "hoverclass" option only on the droppable zone
instead of the column border.
Any idea a about the solution?
Thanks for any help,
Sabri
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
2006 Feb 03
1
RE: autocomplete on safari = focus end of line
"easy" remedy? Don''t worry about Safari ;-)
-----Original Message-----
From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
[mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Louis
Walch
Sent: Friday, February 03, 2006 1:45 PM
To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
Subject:
2008 Mar 22
4
Ajax.Updater not fully work in IE7
My code snapshot: correct work in FF , Opera and Safari, but in IE7 -
isn''t return result
<form action="test.php" method="POST">
<div id="country" style="border: 1px solid #ccc; width: auto"></div>
<br/>
<a href="javascript:getTest()">test</a>
</form>
<script
2008 Jul 05
3
getting and writing atrr with prototype
Hi i''m learning prototype and i need to know something...
Someone knows how to write and get the value of some atribute... i
mean like...jquery that uses $(''#sub-div'').atrr(''alt'',''visible);
in prototype is there something like that?...
I hope you can help me and thanks :D
--~--~---------~--~----~------------~-------~--~----~
You received
2006 Jun 15
3
RE: Yahoo!-like Event object emulation/abstractionin Prototype?
Event.observe(myelement, ''click'', myfunc.bindAsEventListener());
That might fix your wagon.
Greg
> -----Original Message-----
> From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
[mailto:rails-spinoffs-
> bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Sam Rowe
> Sent: Thursday, June 15, 2006 11:24 AM
> To:
2007 Dec 01
3
Event.observe and normal event
Hello!
I posted in another mail that I had a problem with this code:
paths.each(
function(img, i) {
this.imglist[i] = new Image();
this.imglist[i].src = img;
Event.observe(
this.imglist[i],
''onload'',
2008 Mar 21
4
Prototype.js event.stop(event) FF2 not working
stop: function(event) {
if (event.preventDefault) {
event.stopPropagation();
event.preventDefault();
} else {
event.returnValue = false;
event.cancelBubble = true;
}
}
/* br original
stop: function(event) {
Event.extend(event);
event.preventDefault();
event.stopPropagation();
event.stopped = true;
}
*/
};
2008 Jun 03
3
Safari and Inheritance.
The following code doesn''t work in Safari, though its working well on
FF/IE. We just recently started migrating and we are find issues
with Safari 3.X
var SipIxView = Class.create({
initialize: function()
{
}
});
var CdrView = Class.create(SipIxView,{
view: function()
{
}
});
I get the following error in Safari.
var cdrView = new CdrView();
TypeError: