Re: [Proto-Scripty] Hourglass cursor appear on whole page

2009-11-18 Thread Peter De Berdt
On 18 Nov 2009, at 01:30, JoJo wrote: 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

Re: [Proto-Scripty] Re: instanting and reinstanting a function: Ajax.PeriodicalUpdater

2009-11-18 Thread bill
Alex McAuley wrote: No need to worry about multiple instances ... just check the variable before you initialise it... Alex Mcauley http://www.thevacancymarket.com Thanks again david and Alex. I looked but could not find the code to check to see if the variable held an instance or was null.

Re: [Proto-Scripty] Re: instanting and reinstanting a function: Ajax.PeriodicalUpdater

2009-11-18 Thread Alex McAuley
myInstance=new Ajax.PeriodicalUpdater( TO check it ... If(myInstace) { do some code here } Alex Mcauley http://www.thevacancymarket.com - Original Message - From: bill To: prototype-scriptaculous@googlegroups.com Sent: Wednesday, November 18, 2009 11:11 AM Subject:

[Proto-Scripty] Re: onClick vs Element.observe

2009-11-18 Thread ColinFine
On Nov 17, 10:17 pm, phegaro pheg...@gmail.com wrote: Delegation sounds like a good model for doing this although if i want to pass parameters that are custom to each node like which id did it click on then i assume i have store it as a property on the node and pass arguments to the delgated

Re: [Proto-Scripty] Re: instanting and reinstanting a function: Ajax.PeriodicalUpdater

2009-11-18 Thread bill
Alex McAuley wrote: myInstance=new Ajax.PeriodicalUpdater( TO check it ... If(myInstace) { do some code here Gee, that is easy, no wonder I couldn't find it :-) I am more used to PHP so I was looking for something like if (isset(myinstance)) should be a piece of cake.

[Proto-Scripty] Re: onClick vs Element.observe

2009-11-18 Thread Eric
Hi, I also think delegation is the better approach. However, I did notice that none of the examples was dealing with the case where the user click on something that is not a '.item'. You may want to do something like this: function doIt(e) { var element = e.findElement('.item'); if(element

[Proto-Scripty] Maybe OT: passing a function name to a function

2009-11-18 Thread bill
I suspect this is not a prototype question, but then again, every time I turn around I am learning new capabilities of the framework. I need to pass a function name as an argument to a function for a call-back function. Do I just pass the function name as a quoted text argument ? If I do, do I

Re: [Proto-Scripty] Maybe OT: passing a function name to a function

2009-11-18 Thread Alex McAuley
Not sure what u mean Bill... Are you reffering to somehting like the onComplete of Ajax.Updater... If so there is 2 ways to do it.. 1. onComplete: myFunction (then somewhere else) function myFunction() { alert('i got called'); } OR 2. (Anonymous Function) onComplete : function() { alert('I

Re: [Proto-Scripty] Maybe OT: passing a function name to a function

2009-11-18 Thread Alex McAuley
Sorry i get what u mean now!.. Example: function myFunction(options) { alert(options.id); eval(mySecondFunction);// Be very aware that evaluation is bad as JS can be injected if you do not sanitise strings correctly } myFunction({id:1234,callback:'mySecondFunction'}); // alerts 1234 then

[Proto-Scripty] Re: Animated Drop Down with Scrollbar won't display

2009-11-18 Thread Blue Hand Talking
As a note, the script I am using is at: http://livepipe.net/control/scrollbar ...and is by Ryan Johson. And a side note to the admin: Even though I had previously joined this group, I was required to join again to make this post. Something wrong here. Cheers, Jet On Nov 17, 2:01 pm,

[Proto-Scripty] Local autocomplete issue when searching for 'IN' string

2009-11-18 Thread Manuel Corrales
Hello, I am using a local autocomplete and everything is working fine except when I search using the IN letters. When I search like that, the drop down menu show the first match and then other 9 items that do not match the search. This is only happening with this string. I think this maybe because

[Proto-Scripty] Re: Maybe OT: passing a function name to a function

2009-11-18 Thread T.J. Crowder
Hi Bill, If I'm reading you right, you want to pass a callback into another function. Functions are first-class objects in JavaScript so there's nothing special you need to do (and certainly no need for eval). Say you have a logging function: function logMsg(msg) { alert(msg); //

[Proto-Scripty] Re: Limit sortable and draggable lists

2009-11-18 Thread HotShot
Nobody an idea how to limit sortable lists? -- 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-scriptacul...@googlegroups.com. For more options, visit this group at

[Proto-Scripty] Re: Hourglass cursor appear on whole page

2009-11-18 Thread JoJo
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

Re: [Proto-Scripty] Re: Hourglass cursor appear on whole page

2009-11-18 Thread Peter De Berdt
Although it's very uncommon (and generally bad practice) in a web app to have really blocking events (since users can navigate away from a page or close the window while the request is running), if you really want to do that, you have to make sure the user isn't able to click anything else

[Proto-Scripty] Re: Mouseenter mouseleave aren't working correctly under FF.

2009-11-18 Thread indigo
Is there anything i can do about this? Should i wait for a future release? This bug breaks my application as it won't work in firefox. On 8 nov, 02:31, indigo indigomarf...@hotmail.com wrote: No, i'm afraid that's not the problem. I've tried both and the bug stays. Thanks for the help. On

[Proto-Scripty] How do I drag out of a droppable

2009-11-18 Thread Jason Whitmer
I have several draggables and several droppables on the page. Using script.aculo.us, I have the ability to put draggables into droppables. I'm using this code for the onDrop to achieve this: function drop(dragged, dropped, event) { dragged.style.top = 0; dragged.style.left = 0;