[Proto-Scripty] Re: How can I stop the observers?

2008-09-20 Thread Cristisor
I already read the api but I have a problem: the observers are set in the AutoSuggest.js file and I need to stop observing them in a function located in another file. And in the api page they say that I have to use stopObserving the same way observe is used and they give an example that doesn't wo

[Proto-Scripty] Search for special characters in the autocomplete

2008-09-20 Thread Srini
Dear all, We need a solution how to handle special character issue in our application. We integrated a multiple selection id from the autocomplete (as like facebook autocomplete search) library (which developed in prototype). The following is our need, When we enter normal characters (a to z), i

[Proto-Scripty] Event observing and memory

2008-09-20 Thread Mert Hurturk
Hi all, I have a question about event observing and memory management. -/ Let's say I have a div element on page. On dom load, my app starts to observe click event on this element: $('demo-div').observe('click', function() { alert('clicked')} ); -/ Soon after, I remove this div from dom: $('demo-d

[Proto-Scripty] Re: Event observing and memory

2008-09-20 Thread T.J. Crowder
Hi, Yes, the handler will remain in memory. You'll want to call stopObserving() before calling remove(). As of 1.6.0, you can call stopObserving() with just the element (no event name or handler), and Prototype will remove ALL handlers that were set up with observe() from the element. HTH, -- T.

[Proto-Scripty] Re: Search for special characters in the autocomplete

2008-09-20 Thread bluezehn
I'm assuming you're using local autocompleter. I just eyeballed the code for this. The exact matching in the code is on line 436 of control.js. Step one: read this method and understand exactly what it's doing Step two: extend Autocompleter.Local, using code similar to this: Autocompleter.LocalF

[Proto-Scripty] Re: binding to preserve 'this' keyword scope

2008-09-20 Thread RobG
On Sep 20, 3:40 am, MM Developer <[EMAIL PROTECTED]> wrote: > Ok take this function I have. This function is a method to a large > class I have written in JavaScript. I am using the prototype library > as a framework. You can see how I've had to cheat and use > > classObject = this; > > in order

[Proto-Scripty] Re: How can I stop the observers?

2008-09-20 Thread bluezehn
You haven't read the API well enough then. Separate files essentially mean very, very little. You need to keep a reference to the function that you set on the observer. What's important to realise here is that in javascript you have instances of functions, in exactly the same way as you might hav

[Proto-Scripty] Re: How can I stop the observers?

2008-09-20 Thread kangax
On Sep 20, 11:32 am, bluezehn <[EMAIL PROTECTED]> wrote: > You haven't read the API well enough then. Separate files essentially > mean very, very little. > > You need to keep a reference to the function that you set on the > observer. What's important to realise here is that in javascript you > h

[Proto-Scripty] Using Prototype/Scriptaculous in a popup window

2008-09-20 Thread Bobby.D
I'm using the following function to generate a pop up box: var win=null; function popUp(page, name, w, h, scrollb) { var winL = (screen.width-w)/2; var winT = (screen.height-h)/3.5; var settings = 'height='+h+','; settings += 'width='+w+','; settings += 'to

[Proto-Scripty] Re: Event observing and memory

2008-09-20 Thread kangax
On Sep 20, 4:48 am, "Mert Hurturk" <[EMAIL PROTECTED]> wrote: > Hi all, > I have a question about event observing and memory management. > > -/ Let's say I have a div element on page. On dom load, my app starts to > observe click event on this element: $('demo-div').observe('click', > function() {

[Proto-Scripty] Re: Using Prototype/Scriptaculous in a popup window

2008-09-20 Thread bluezehn
Can I please, please beg of you not to use a popup window. It's ugly. Most browsers just block them anyway so it's useless. You've got to remember as well that a popup window is a COMPLETELY separate browser instance. You can't access any variables at all from the source window, and prototype/scr

[Proto-Scripty] Re: Using Prototype/Scriptaculous in a popup window

2008-09-20 Thread jason maina
In the parent page/window you could have an invisible div then use ajax.request to update the div with desired data and seem to popup by setting visibility=true On 9/20/08, Bobby.D <[EMAIL PROTECTED]> wrote: > > Ok, I was just checking about the popup, I thought perhaps using the > function to op

[Proto-Scripty] Re: Using Prototype/Scriptaculous in a popup window

2008-09-20 Thread Bobby.D
Ok, I was just checking about the popup, I thought perhaps using the function to open would screw stuff up. I am designing an Intranet Business Web App, restricted to 1 browser. If I was going to use a "lightbox" effect I'd just open a whole new page, but I'm trying to give the app a slightly more

[Proto-Scripty] Event.Observe and Dynamic Drop Downs

2008-09-20 Thread Newbee
Hello, I'm new to Prototype development, and love the power it gives. What I don't get is why the Drop Down change event fires only once, for a dynamically created Select Drop Down, in my example below (using 1.5 of Prototype). Any thoughts on this would be greatly appreciated by a ruby / proto

[Proto-Scripty] array.each question

2008-09-20 Thread Spalx
Hi guys, I`ve recently started using prototype because of its Ajax functions, though it doesnt let me use the for(in) function of JavaScript, so i`ve referred to the array.each function, though that doesnt quite work how i need it to. Here`s what i have: var arr = new Array(); arr[2] = "some text"

[Proto-Scripty] Re: array.each question

2008-09-20 Thread kangax
On Sep 20, 6:40 pm, Spalx <[EMAIL PROTECTED]> wrote: > Hi guys, > I`ve recently started using prototype because of its Ajax functions, > though it doesnt let me use the for(in) function of JavaScript, so > i`ve referred to the array.each function, though that doesnt quite > work how i need it to.

[Proto-Scripty] Re: Draggables contained by draggables

2008-09-20 Thread Matt Petrovic
When you say above and below, you mean on the z-axis? are you testing this in IE? If so, that's probably it. IE is known to have problems with z-index. Look up IE and z-index to see more details with the problem and solutions for it. On Sep 19, 2:49 pm, bluezehn <[EMAIL PROTECTED]> wrote: > I'm