Well unfortunately there is a 1MB leak in IE7 when you run the
event_test on the latest version of prototype. Since there is
significant changes in this version compared to the publicly available
1.6.0.3 version, I am guessing you guys are getting close to releasing
1.6.0.4?
FWIW, I took the chec
On Jan 15, 6:15 pm, "Richard Quadling"
wrote:
[...]
> You could add the same class to each element and ...
>
> $$('.classname').invoke('observe', 'click', function(ev) { ... });
Not a good idea with many elements. Better would be:
document.observe('click', function(e, el) {
if (el = e.findE
On Jan 15, 4:47 pm, mr_justin wrote:
> Hey kangax,
> I just cloned prototype's git source, ran the tests to generate the
> HTML test files, then edited the _destroyCache() method to include the
> following:
>
> for (var element in Element.cache) Element.cache[element] = null;
>
> (it already incl
2009/1/16 geoffcox :
>
>> You could add the same class to each element and ...
>>
>> $$('.classname').invoke('observe', 'click', function(ev) { ... });
>
> Many thanks Chris - that's done the trick!
Chris?
>
> Cheers,
>
> Geoff
>
>>
>> --
>> -
>> Richard Quadling
>> Zend Certified Engineer :
> You could add the same class to each element and ...
>
> $$('.classname').invoke('observe', 'click', function(ev) { ... });
Many thanks Chris - that's done the trick!
Cheers,
Geoff
>
> --
> -
> Richard Quadling
> Zend Certified Engineer :http://zend.com/zce.php?c=ZEND002498&r=213474731
>
2009/1/15 geoffcox :
>
> Hello,
>
> I have
>
> document.observe("dom:loaded", function () {
>if ($("send1")) {
>$("send1").observe("click", function (evt) {
>evt.stop();
>getData(evt.element().form);
>});
>}
> });
>
> in which the send1 is the id of
Hello,
I have
document.observe("dom:loaded", function () {
if ($("send1")) {
$("send1").observe("click", function (evt) {
evt.stop();
getData(evt.element().form);
});
}
});
in which the send1 is the id of the button in a form
If I have multiple
Hey kangax,
I just cloned prototype's git source, ran the tests to generate the
HTML test files, then edited the _destroyCache() method to include the
following:
for (var element in Element.cache) Element.cache[element] = null;
(it already includes code to stopObserving all events)
I then loade
That was just what I needed.
Thanks!
On Jan 14, 3:14 pm, Diodeus wrote:
> One was to solve this is to set a flag that prevents a second effect
> from running until the first has completed:
> var running = false
>
> function previewOn(thisDiv) {
> running=true
> document.getElemen
On Jan 15, 2:53 pm, mr_justin wrote:
> Wanted to update this thread, I just took some screen captures running
> 9 page refreshes on the Prototip2 demo page, showing an increase in
> memory usage with every page refresh.
>
> See image:http://farm4.static.flickr.com/3370/3198951197_55e5869fbc_o.png
Wanted to update this thread, I just took some screen captures running
9 page refreshes on the Prototip2 demo page, showing an increase in
memory usage with every page refresh.
See image:
http://farm4.static.flickr.com/3370/3198951197_55e5869fbc_o.png
--~--~-~--~~~---~
Nathan,
I am not getting this yet!
Say I have following simple form - what is
getData(evt.element().myform);
sending to getData()?
Cheers,
Geoff
document.observe("dom:loaded", function () {
if ($("send")) {
$("send").observe("click", function (evt) {
evt.stop()
Thanks Nathan - will work on that.
Cheers
Geoff
On Jan 15, 2:29 pm, nlloyds wrote:
> Geoff,
>
> > 'afraid I'm not able to follow all you've written but could you just
> > explain what you mean by "avoiding inline event handlers"?
>
> > > onClick="getData(this.form)">
>
> > Would above have to
Hi, I have been trying to find a way of making prototype play nicely
with mootools. There seems to be a perfect solution in protosafe, but
all the links to it seem to have gone dead. Does anybody know where I
can get it, have a copy they can send me or know of any alternatives.
Cheers
Chris
--~-
Hi Edd,
> Just to confuse issues slightly, wouldn’t it be better to use #map
> instead of #each?
Why? He isn't using the return value, so no need to create the return
array.
One concern in both cases, though, is whether Effect.SlideDown will be
bothered by the extra parameter provided by both
if you want to work out whats currently selected you can add a click event
to the tab headings and store the value in a hidden field somewhere .. then
you can allways access it whenever you need to
Regards ALex
- Original Message -
From: "Matt"
To: "Prototype & script.aculo.us"
Se
Thanks TJ i didnt think about it like that, the second way would work ...
its oky now as i just mke it fade away after 10 seonds or something
Thanks again
Alex
- Original Message -
From: "T.J. Crowder"
To: "Prototype & script.aculo.us"
Sent: Thursday, January 15, 2009 4:26 PM
Subject
Thanks TJ, think I get it now!
One question - since I do have multiple s with a class of 'test',
it might just be easier to make them all do the same effect at once
(the user will only see one at a time anyway due to the tabs and I
can't figure out how to make the script aware of which one's curr
Hi Alex,
Apologies if I'm missing the point, but can't you use
document.stopObserving[1]?
[1] http://prototypejs.org/api/document/stopObserving
E.g.:
* * * *
function showErrorDiv(msg) {
var div = new Element('div', {
'id':'errDiv',
'class': 'error'
});
div.updat
Thanks joe,
I wouldn't mind getting my hands on your code work, currently trying to
understand SWFUpload flash/javascript.
Dont worry to much about the documentation i will ask where things get to
hit the rocks.
Kind regards
Jason
On Thu, Jan 15, 2009 at 5:26 PM, joe t. wrote:
>
> If you can't
TJ,
Just to confuse issues slightly, wouldn’t it be better to use #map
instead of #each?
Edd
P.S., I haven’t tested, so #map may not work.
>
> If you know there will only be one and don't mind if the effect
> applies to all of them if (for whatever reason) there's more than one,
> Enumerable#e
I scrapped the idea and made it dissapear after a certain time .. was to
much a headache !!
- Original Message -
From: "bflanagan"
To: "Prototype & script.aculo.us"
Sent: Thursday, January 15, 2009 2:38 PM
Subject: [Proto-Scripty] Re: Stoping observing
>
> There's probably a correct
There's probably a correct event model way to do this, but, in the
meantime, how about setting the 'removeErrorElement' equal to an empty
function?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Prototype & script.
asynchronous file upload via Ajax is impossible at the moment .. there is 2
ways to do it ... 1 is an iframe (takes minutes to set up) the other is
flash
- Original Message -
From: "joe t."
To: "Prototype & script.aculo.us"
Sent: Thursday, January 15, 2009 2:26 PM
Subject: [Proto-Scri
The div isnt allways created by click .. its called by my method/function if
and when i need it .. this is the trouble i am having ...
At the moment ive got the method to check for a click (in my tests) and it
finds the div (as you have put below - this was my first approach at it
yesterday !!)
Geoff,
> 'afraid I'm not able to follow all you've written but could you just
> explain what you mean by "avoiding inline event handlers"?
>
> onClick="getData(this.form)">
>
> Would above have to be changed/replaced?
An inline event handler means you're putting scripts in html elements
instead
If you can't utilize a Flash solution, the only other way is an
IFRAME. i had a need for this too, and spent a long time developing
quite an elaborate Prototype-based JS class for the client side, and a
PHP handler on the server side. If you're interested, let me know and
i'll be happy to share (i
Since your function is creating the div, you can put a conditional in
it to check for the existence of the div before attempting to add it.
Event.observe(document,'click', function() {
if($('divYouJustAdded'){
removeTheElementIJustAdded();
} else {
addTheElement();
}
}
Afternoon Guys / Gals ..
I'm having a slight headache with stop observing
i'll try to explain my code ...
upon click of an element (in this case a form submit) my javascript
goes through some calculations and if needed calls a function to
create an error message .. this function creates a
Hi Richard,
Glad that helped. On the IDs, it sounds like that means you won't
have duplicated IDs on the page, which was my only concern. It also
sounds like they're sufficiently complex (rather than just being 1..n)
that sticking with this DOM-based solution is probably best (allowing
for my i
Hi Matt,
Yes, *slightly*: Element#select() and $$() both return an array of
matching (extended) elements. So you need to index into it.
If you know there will only be one and don't mind if the effect
applies to all of them if (for whatever reason) there's more than one,
Enumerable#each makes f
Ok - I think I "solved" the problem.
I exchanged the disabled/enabled with addClassName('dropped')/
removeClassName('dropped').
So the user doesn't see if the class is still attached to the
checkbox. If he moves the mouse it will be gone. The final code looks
like this, maybe you need it yoursel
Hi,
I decided to open a new thread (this is the old one:
http://groups.google.com/group/prototype-scriptaculous/t/303d050dd9c07329),
because it is a general question how to use the Sortable of
script.aculo.us correctly.
Simple HTML-Code:
Item 1
Item 2
Javascript:
Sortable.
Kangax,
> So, yeah, this is yet another reason not to touch `Element.prototype`
> (or not use inline event handlers)
'afraid I'm not able to follow all you've written but could you just
explain what you mean by "avoiding inline event handlers"?
Would above have to be changed/replaced?
Does a
Thats a good idea. This code works actually. I just cannot (really)
override existing methods. If I include methods with the same name in
MySortable, they are not called, because within Sortable all methods
are called with Sortable.nameOfMethod() - they don't use
this.nameOfMethod().
On 14 Jan.,
35 matches
Mail list logo