I think I figured it out. The callback must not have parentheses.
FAIL:onUpdate: someFunction();
GOOD: onUpdate: someFunction;
I have no idea why. I am a beginner to JS.
On Aug 15, 11:17 pm, Mojito tokyot...@gmail.com wrote:
Why is the onUpdate callback fired right when the Sortable is
And how would I contact this Thomas god?
On Aug 22, 11:07 am, Walter Lee Davis wa...@wdstudio.com wrote:
Where by Sam I meant Thomas, obviously...
On Aug 22, 2009, at 2:04 PM, Walter Lee Davis wrote:
I asked on the Github list, and only the repo owner can delete pages
entirely. We are
If I want to quickly develop without looking up whether I need NEW or
don't need NEW, can I just put NEW in front of everything? Would this
lead to a memory leak or does Prototype have some sort of garbage
collection?
On Aug 20, 2:04 am, T.J. Crowder t...@crowdersoftware.com wrote:
Hi,
In
How do I use bind? Doesn't the bind function take an object as an
argument? I'm doing this stuff inside a class, not an object.
On Aug 22, 6:15 pm, Gareth Evans agr...@gmail.com wrote:
Use bind (method on the function object)
see the typewriter example i wrote for syntax
On Sun, Aug 23, 2009
in js is an object. Even function literals.
On 8/22/09, JoJo tokyot...@gmail.com wrote:
How do I use bind? Doesn't the bind function take an object as an
argument? I'm doing this stuff inside a class, not an object.
On Aug 22, 6:15 pm, Gareth Evans agr...@gmail.com wrote:
Use bind
Nevermind. I found it though Google search:
http://www.prototypejs.org/api/periodicalExecuter
Boy, was it hard to find.
On Aug 24, 4:24 pm, Paul Kim kimba...@gmail.com wrote:
I don't think Prototype has a plain timer, but couldn't you just use
setTimeOut?
setTimeout(javascript statement,
I (Mojito) [don't know why my first post name differs from reply name]
have solved by issue. I was passing in strings with '\0' on their
ends. So 'mpg\0' does not equal 'mpg'. It was a nightmare to debug
because '\0' is invisible.
On Sep 2, 10:29 am, enigment enigm...@gmail.com wrote:
Ah,
In my head, I'm loading several JS files. I'm expecting this to
occur:
1) script1.js is loaded
2) script1.js runs - it creates an object
3) script2.js is loaded
4) script2.js runs - it creates a different object that depends on
script1's object.
5) and so on
This works perfectly in Firefox
= new MYAPP.Class2();
});
On Sep 3, 10:40 am, DJ Mangus d.man...@gmail.com wrote:
See this
article:http://proto-scripty.wikidot.com/prototype:how-to-load-scripts-dynami...
On Thu, Sep 3, 2009 at 9:25 AM, JoJo tokyot...@gmail.com wrote:
Instead of loading JS in the head, how do I do
to fix similar errors on
my web desktop
Alex Mcauleyhttp://www.thevacancymarket.com
- Original Message -
From: JoJo tokyot...@gmail.com
To: Prototype script.aculo.us prototype-scriptaculous@googlegroups.com
Sent: Thursday, September 03, 2009 7:40 PM
Subject: [Proto-Scripty] Re
I never knew about the shortcut. Could you point me to the page that
talks about this? Thanks!
On Sep 4, 6:30 am, mau mauro.torr...@gmail.com wrote:
JoJo, thanks for your response,
There’s also a shortcut method offered which you can call on the
element itself. Note, that this will only
();
});
//]]
/script
/head
body
button onclick=MYAPP.class1.speak() /make class1 speak/
button
/body
/html
+
On Sep 4, 12:51 am, T.J. Crowder t...@crowdersoftware.com wrote:
Hi JoJo,
I suspect there's some small (but important
, JoJo tokyot...@gmail.com wrote:
Hi TJ,
This is the simple script which will say MYAPP.class1 is null or not
an object - Line 33 about 25% of the time on IE8 in IE7-compatability-
mode. You must hit refresh a few times and then click the button to
see the error. Maybe we need to find out
:
Hi JoJo,
Excellent example of a pared-down test case, thanks for that.
I don't have time right now to try this, but just quickly: You say
that the code in the load event never runs, are you sure you haven't
interrupted it by clicking the button really early and causing the
error
I'm highlighting an input textbox if the user forgot to fill out the
form. After the box get highlighted, it looks like retro Windows 95
with thick borders and boxy edges. So I attempt to remove the styling
with an afterFinish callback, but for some reason, that is never
called. Why?
if
http://www.prototypejs.org/api/utility/dollar-r
From the documentation of the Range utility, it seems like it can only
increment by 1's. For example, $A($R(1,10,true)) gives you:
[1,2,3,4,5,6,7,8,9,10].
I'm looking for a way to specify that I want to increment by any
value. Let's say count up
Upon entering the page and clicking on an inPlaceEditor, I get the
expected result: single line editing of a text field. I then click
ok without even touching the text. My PHP script trims it and spits
back the value. I then click to edit again, but now the box has become
a 3 multi-line box. It
Why is it that the following gives the error: [Exception... An
invalid or illegal string was specified code: 12]
var title = $(channelId).down('strong').down('a').innerHTML;
While this one, which looks identical to me work just fine?
var title = $$('#' + channelId + ' strong
/ comwww.crowdersoftware.com
On Oct 12, 11:52 pm, JoJo tokyot...@gmail.com wrote:
Why is it that the following gives the error: [Exception... An
invalid or illegal string was specified code: 12]
var title = $(channelId).down('strong').down('a').innerHTML;
While this one, which looks identical
* onUninitialized,
* onLoading,
* onLoaded,
* onInteractive,
* onComplete and
* onException.
I'm trying to display a swirly animated GIF while my AJAX request is
being processed. I am currently using the onLoading callback to
display the GIF. In some rare cases, the
to
prototypejs, so for some of those processes, it doesn't work for us,
but this does the trick ;) )
Cheers,
David.
On Oct 20, 1:52 am, JoJo tokyot...@gmail.com wrote:
* onUninitialized,
* onLoading,
* onLoaded,
* onInteractive,
* onComplete and
* onException
I wanted to prevent rapid double clicking of an AJAXed tab. My code
works well in IE8, FF, and S. In IE7 and 6, the tab gets disabled
permanently even though I see both window.status calls printing out
the expected stuff. What's going on?
++
var tabOnclick =
Is it poor practice to use $$?
$$('#grandparent #parent tag.class');
I've been using $$ quite a lot because it has sped up DEVELOPMENT, but
now I have realized that it will slow down MAINTENANCE. Recently, my
boss asked me to move a whole div to another part of the page. Since
I was
When the user clicks a button, I want to show an hourglass cursor
while its onclick handler is being run. I tried this:
$$('body').first().setStyle({cursor: 'progress'});
The hourglass only appears when I hover over the body background. When
hovering over the button itself (which is an a), the
I am making a website with an embedded app, so it is very much like a
desktop application. There are blocking events.
On Nov 18, 12:12 am, Peter De Berdt peter.de.be...@pandora.be wrote:
On 18 Nov 2009, at 01:30, JoJo wrote:
When the user clicks a button, I want to show an hourglass cursor
How do you get the true height of the body element? I have a very long
page and calling getDimensions() only returns the viewable area's
height.
Thanks.
--
You received this message because you are subscribed to the Google Groups
Prototype script.aculo.us group.
To post to this group, send
I want to remove an element from the DOM after fading it.
new Effect.Fade(
'lightbox', {
duration: this.animationTime,
afterFinish: $('lightbox').remove()
}
);
The above code works but gives me an error. Why is it still trying to
calculate opacity after it's finished?
{width: w, height: h};
On Nov 29, 8:44 pm, JoJo tokyot...@gmail.com wrote:
How do you get the true height of the body element? I have a very long
page and calling getDimensions() only returns the viewable area's
height.
Thanks.
--
You received this message because you are subscribed
I have a textarea id=foo which contains JS code that people can
copy and paste. It's dynamically generated, so I do something like
this:
$('foo').update('script . ' + this.someVariable + '/);
The documentation on Element.update states that the script will be
evaluated rather than inserted
All conditions.
On Dec 7, 4:27 pm, Rick Waldron waldron.r...@gmail.com wrote:
What condition should exist to stop the evaluation?
-- Sent from my Palm Prē
JoJo wrote:
I have a lt;textarea id=foo which contains JS code that people can
copy and paste. It's dynamically generated, so I do
I'm creating a widget where I tell people to copy and paste this code
onto their site:
script type=text/javscript src=http://www.site.com/script.js;/
script
div class=widget/div
Script.js looks for all the widget divs on the page by using $$ and
dynamically fills them up. Now, I'm not
How does dom:ready prevent multiple executions of the same script?
On Dec 16, 6:16 am, Alex McAuley webmas...@thecarmarketplace.com
wrote:
Why not attach the widget code to dom:ready
Alex Mcauleyhttp://www.thevacancymarket.com
- Original Message -
From: JoJo tokyot...@gmail.com
/ comwww.crowdersoftware.com
On Dec 15, 8:57 pm, JoJo tokyot...@gmail.com wrote:
I'm creating a widget where I tell people to copy and paste this code
onto their site:
script type=text/javscript src=http://www.site.com/script.js;/
script
div class=widget/div
Script.js looks for all the widget
I want to update the title tag. This works in Firefox:
$$('title').first().update('dynamic string');
Do you know why there is a runtime error in Internet Explorer 8?
--
You received this message because you are subscribed to the Google Groups
Prototype script.aculo.us group.
To post to this
$('div').getStyle('padding-top') returns 1em in Internet Explorer
and 12px in Firefox. It appears that Firefox has recursively
multiplied all its ancestor's font-sizes to get the absolute value of
12px. This is actually better for the particular GUI I'm making. Is
there anyway for Internet
I noticed that the onFailure callback never fires when there's
actually an error in Ajax.Request. Commonly, I just alert('server
busy') in the callback. I never see this alert when my web host is
overloaded and just doesn't respond at all. How do I alert an error
message when the server is too
( 'Cache-Control: max-age=0, must-revalidate, post-check=0, pre-
check=0', false );
On Mar 16, 2:17 am, Daan Mortier daanmort...@gmail.com wrote:
JoJo:
I'm doing some cross-site AJAX hack by dynamically inserting a script
tag. This script tag loads a PHP script that prints out javascript:
Me
(20,001) of vertical planes to stack...
FWIW,
--
T.J. Crowder
Independent Software Consultant
tj / crowder software / comwww.crowdersoftware.com
On Apr 1, 1:13 am, JoJo tokyot...@gmail.com wrote:
On all browsers but Safari, getStyle('zIndex') returns a string
representation of the max
I'm using an anchor tag to run some JS when clicked. This works
perfectly in Firefox, but Internet Explorer 8 wrongfully fires the
onbeforeunload callback. I know this can be solved by changing
HREF=javascript:void(0) to HREF=#, but it won't work in my
situation because my anchor is very low in
-
From: prototype-scriptaculous@googlegroups.com
[mailto:prototype-scriptacul...@googlegroups.com] On Behalf Of JoJo
Sent: Saturday, April 24, 2010 4:46 PM
To: Prototype script.aculo.us
Subject: [Proto-Scripty] anchor button causes IE8 to fire onbeforeunload
I'm using an anchor tag to run
Why can't I create hashes where the keys are variables?
var klass = Class.create(
initialize: function() {
this.field = new Hash({klass.staticVar: 999});
}
);
klass.staticVar = 888;
SyntaxError: missing : after property id { message=missing : after
property id, more...}
I
Is it possible to test whether the window has been loaded or not? I
have a script.js that anyone can use. Some people will put it in the
head tag, so this script will be run before Window has been loaded.
Other people might do something crazier like only load script.js when
someone clicks a
PROBLEM
In IE7, many of Prototype's functions stop working when Prototype.js
is included twice. What is the best practice for shielding against
multiple loads of Prototype?
BACKGROUND
I'm creating a widget script people can embed on their websites. My
script uses Prototype. There's a
for the existence of Prototype.Version (look in
scriptaculous.js for the exact syntax) and then error out or skip
loading?
Walter
On Jul 8, 2010, at 5:02 PM, JoJo wrote:
PROBLEM
In IE7, many of Prototype's functions stop working when Prototype.js
is included twice. What is the best
my code. Anyway,
this is not a bulletproof solution because if the site owner's
Prototype loads after mine, it will still be included twice and crash
IE7.
On Jul 8, 2:39 pm, JoJo tokyot...@gmail.com wrote:
I can do a lot of things like:
if (typeof(Prototype) === 'undefined') {
// put all my
I'm collecting stats on user clicking behavior. In this example, I
write an entry into the database whenever someone clicks a link that
starts a download:
a href=program.exe onclick=logClick()download program/a
function logClick() {
new Ajax.Request(
'/logger.php?action=1'
);
}
This
I have several lines of code that I want to run atomically (no context
switches to other code). Please look at the following barebones
example that illustrates the issue:
//=
function doAjax() {
console.info('making request');
new Ajax.Request(
url, {
onSuccess:
24, 2010 at 3:21 PM, JoJo tokyot...@gmail.com wrote:
I have several lines of code that I want to run atomically (no context
switches to other code). Please look at the following barebones
example that illustrates the issue:
//=
function doAjax() {
console.info
I believe I solved the problem. I had a queue of work orders. One of
these work orders queued up another work order, so it was a nested
AJAX request - BAD IDEA!
On Sep 24, 12:56 pm, JoJo tokyot...@gmail.com wrote:
I don't need A to finish before B. I need A's callbacks to not be cut
off by B's
I am trying to pre-select an option in a standard HTML select dropdown
using option.writeAttribute('selected', 'selected'). It worked in IE
and FF, but not in Safari. I had to change the code to
option.selected=true for all 3 browsers to work. I'd prefer to use the
writeAttribute wrapper instead
Is there a version of document.viewport.getScrollOffsets for DIVs with
CSS style of overflow:auto?
I have a DIV with scroll bars and it contains 150 images. I wish to
only load the images as the user scrolls to them, so I don't burden
the server. To do this, I would need to detect the scroll
$('someElement').hide.delay(2);
$('someElement').show.delay(3);
These functions trigger this error: 'style' is null or not an object
in IE7. The only way to solve it is to write long ugly code:
var f = function() {
$('someElement').hide();
};
f.delay(2)
--
You received this message because
I'm creating a standard chat system. When the user hits the Enter key
in the textarea, I send her comment to the server. Then I clear her
message so she can begin typing a new one. The cursor blinker
disappears when I do this clear. It's better for usability if the
blinking remains. How do I put
activate() did not fix it.
On Oct 19, 11:08 pm, Walter Lee Davis wa...@wdstudio.com wrote:
Try activate in place of focus, and see if that works for you. Just
checking -- you do have Prototype in your page, right?
Walter
On Oct 19, 2010, at 9:59 PM, JoJo wrote:
I'm creating a standard
is processing...
On Oct 20, 1:36 pm, JoJo tokyot...@gmail.com wrote:
activate() did not fix it.
On Oct 19, 11:08 pm, Walter Lee Davis wa...@wdstudio.com wrote:
Try activate in place of focus, and see if that works for you. Just
checking -- you do have Prototype in your page, right?
Walter
I use anchors to call javascript functions. Usually, I do this:
a href=javascript:void(0) onclick=someFunc(); return false;
call the function
/a
This works fine in all browsers. Window.onbeforeunload is never
triggered because the ONCLICK returns false, and thus the HREF if not
executed. When
software / com
www / crowder software / com
On Oct 22, 2:41 am, JoJo tokyot...@gmail.com wrote:
I use anchors to call javascript functions. Usually, I do this:
a href=javascript:void(0) onclick=someFunc(); return false;
call the function
/a
This works fine in all browsers
Why is the Element::store() not listed in the documentation???
http://www.prototypejs.org/api/element .
Thanks for pointing out this feature. I've been stupidly creating my
own data structures to further describe DOM elements. Now I don't have
to do that.
On Nov 22, 12:31 pm, Luke
58 matches
Mail list logo