Re: [Proto-Scripty] event on leaving page

2013-01-10 Thread Walter Lee Davis
If onbeforeunload returns true-ish, the browser will put up a dialog with the results of that true-ish value being cast to a string interpolated inside the standard dialog. There is no need to have confirm in there as well. Try either returning false if all is well, or a string with your message

Re: [Proto-Scripty] Event On click behavior with selector

2012-11-12 Thread Victor
1. How checkbox is related to clicks on radio buttons? 2. bindAsEventListener(this) isn't needed - bind(this) is enough. 3. Handler in Element#on retrieves clicked element as second argument, no need to find it via var elm = e.findElement(); 4. elm.getValue() for checkbox will

Re: [Proto-Scripty] Event On click behavior with selector

2012-11-03 Thread kstubs
No errors in console. I assumed that defining the click event for a given css selector would not have an effect on the normal click behavior. Relevant code: var chkClicks = this.__chkClicks.bindAsEventListener(this); this.__z__chkClicksthis = this.form.on('click','input[type=checkbox]',chkClic

Re: [Proto-Scripty] Event On click behavior with selector

2012-11-03 Thread Walter Lee Davis
On Nov 3, 2012, at 1:51 PM, kstubs wrote: > If I define an on click event for a given css selector did I disable or trap > the default click event? Reason I'm asking is I have a form and I have wired > up a click event for a given input type like this: > > this.form.on('click', 'input[type=ch

Re: [Proto-Scripty] Event On click behavior with selector

2012-11-03 Thread kstubs
@mikhail, please elaborate On Saturday, November 3, 2012 11:06:48 AM UTC-7, mikhail wrote: > > try 'change' event. > -- You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" group. To view this discussion on the web visit https://groups.google

Re: [Proto-Scripty] Event On click behavior with selector

2012-11-03 Thread fntzr
try 'change' event. -- 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-scriptaculous@googlegroups.com. To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@

[Proto-Scripty] Event On click behavior with selector

2012-11-03 Thread kstubs
If I define an on click event for a given css selector did I disable or trap the default click event? Reason I'm asking is I have a form and I have wired up a click event for a given input type like this: this.form.on('click', 'input[type=checkbox]' ,functionChkClicked); Now my radio clicks ar

[Proto-Scripty] Event observer not working in version prototype 1.7 but works fine in 1.5

2012-08-08 Thread Imdad Ali Khan
Can anyone help me with below code which works fine in 1.5 but not with 1.7 JS File. Form.YooEventObserver = Class.create(); Form.YooEventObserver.prototype = Object.extend(new Abstract.EventObserver(), { minQueryLength: 3, getValue: function() { // return YAHOO.util.Connect

[Proto-Scripty] Event fire bubbling

2011-09-08 Thread kstubs
Shouldn't the following fire all the way up to the document element, so: document.on('anychart:onEventMarkerClick', ...) is valid? Assuming this.container is some HTML element within the document. onEventMarkerClick: function(e) { var obj = {'index': this.index, 'event': e}; Ev

[Proto-Scripty] Event Keyup a-z key response

2011-07-09 Thread kstubs
Is there a clever way to ignore all other keystrokes, like arrow keys and only responsd to keycodes ranging from a-z and 0-9? I guess another valid keystroke would be SHIFT+. So something like: onKeyUp: function(e) { // if not valid keystroke event return; // otherwise, do the followin

Re: [Proto-Scripty] event observe for image problem on IE

2011-06-29 Thread Johan Arensman
This is because your newImg is not an extended element. Create a new img element using: new Element('img'); or use the prototype dollar function (http://api.prototypejs.org/dom/dollar/) to properly extend your element with the prototype methods: $(newImg); Your addImage method could be rewritt

[Proto-Scripty] event observe for image problem on IE

2011-06-29 Thread edwingt
Hello I'm trying to do an event observe work on IE, it works good on FF and Chrome, this is the script. When the newImg.observe() is reached I catch an exception with this msg "'src' is undefined" function addImage(src, div) { var newImg = document.createElement("img"); newImg.id="

Re: [Proto-Scripty] event on leaving page

2011-03-09 Thread Walter Lee Davis
Oh good. So for my edification, are you saying that you are able to run a function after the unload event? I may have been laboring under a misconception about that. Thanks, Walter On Mar 9, 2011, at 4:06 PM, Joannes De KOSTER wrote: Thanks a lot. beforeunload fires earlier than unload .

Re: [Proto-Scripty] event on leaving page

2011-03-09 Thread Joannes De KOSTER
Thanks a lot. beforeunload fires earlier than unload . Good to know! By the way, i just forgot to implement my LibererThreads function :/ Bye and thanks again for your help. 2011/3/9 Walter Lee Davis > Try observing beforeunload instead. I think that unload fires too late -- > i.e. after the p

Re: [Proto-Scripty] event on leaving page

2011-03-09 Thread Walter Lee Davis
Try observing beforeunload instead. I think that unload fires too late -- i.e. after the page has really unloaded, and thus there's nothing left of the page to do any work for you. Walter On Mar 9, 2011, at 3:53 PM, Joannes De KOSTER wrote: Hello, I try to launch a javascript when i leave

[Proto-Scripty] event on leaving page

2011-03-09 Thread Joannes De KOSTER
Hello, I try to launch a javascript when i leave a page. I tryed this way but it don't seem to be working right : Event.observe(window, 'unload', LibererThreads); Does anybody have an idea how to deal with this? Thanks a lot. -- Sincères salutations. Joannes De KOSTER 4 impasse de l'Oranger

Re: [Proto-Scripty] Event capture

2010-11-30 Thread Glenn Maynard
On Tue, Nov 30, 2010 at 3:11 AM, Johan Arensman wrote: > http://api.prototypejs.org/dom/Event/observe/ > > Changes in 1.6.x > > Prior to Prototype 1.6, Event.observe supported a fourth argument > (useCapture), a boolean that indicated whether to use the browser's > capturing phase or its bubbling

Re: [Proto-Scripty] Event capture

2010-11-30 Thread Johan Arensman
http://api.prototypejs.org/dom/Event/observe/ Changes in 1.6.x Prior to Prototype 1.6, Event.observe supported a fourth argument (useCapture), a boolean that indicated whether to use the browser's captu

[Proto-Scripty] Event capture

2010-11-28 Thread Glenn Maynard
[sent by email to -core first, forwarding to correct list; recommend using standard list naming, prototype-dev and prototype-user] Prototype used to support event capture, and this mysteriously disappeared at some point. What happened? Event capture is indispensable for some things. It doesn't

[Proto-Scripty] Event when moving element between two sortables

2010-11-25 Thread Scrooge
Hello All, I would like to display an alert() message when a user moves an element between two sortables. But only then, not every time he changes the order of the elements within one sortable. Any idea how I could achieve this? Best Regards, Benedikt -- You received this message because you ar

[Proto-Scripty] Event click Firefox vs others

2010-06-08 Thread mrbana...@googlemail.com
Hi, I m using current Prototype 1.7 RC. The following code behaves differently in Firefox compared to the other browsers (IE, Safari, Chrome). In firefox handler is triggered for left AND right button mouse clicks, whereas the other browers just trigger on left button clicks. document.observe("

[Proto-Scripty] Event Delegation matching outside of 'boundary' element

2010-05-29 Thread mmerlin
Environment: Prototype 1.7 rc2; XAMPP on Ubutnu 10.4 (running as VirtualBox vm); browsers: FF3.6.3 (localhost on Ubuntu 10.4); FF3.6.3 (Win XP SP3 over lan); IE8.0.6001 (Win XP SP3 over lan) Using Element.on [$(ele).on( 'click', '.special', callback);] triggers a callback for clicks inside of ele

Re: [Proto-Scripty] Event listeners on elements 'written over' by AJAX

2010-05-10 Thread Walter Lee Davis
What I prefer to do is to add a single persistent observer to an element that won't be destroyed during the life of the page, and then delegate listening to that element. So if I had a list of things that I wanted to observe, and one of the things I was doing was adding or deleting those li

[Proto-Scripty] Event listeners on elements 'written over' by AJAX

2010-05-10 Thread Junkshops
Hi all, I'm wondering what the appropriate thing to do is wrt event listeners on elements that get replaced by an Ajax.Updater call or something similar. It seems like a giant pain to have to run through all the sub elements of the container you're updating and remove all the listeners for every p

[Proto-Scripty] Event ordering for cross domain frames

2009-12-09 Thread Sumit
Hi, So i finally came up with protoype based implementation for crossdomain iframe communication based on Julien's example as can be seen live in http://www.julienlecomte.net/blogfiles/cross-frame/ For quick reference, lets say an iframe from domain B is hosted on main site from domain A. In order

[Proto-Scripty] event order part2

2009-11-27 Thread vtsuper
I have post a question before http://groups.google.com/group/prototype-scriptaculous/browse_thread/thread/e7c9e808777c8ba7/f2af8212bc699643?lnk=gst&q=event+order#f2af8212bc699643 I would like to solve this problem accroding to this site https://mootools.lighthouseapp.com/projects/2706/tickets/35-i

[Proto-Scripty] Event....

2009-10-29 Thread Alex Mcauley
Is there a way to spoof the window event ... Basically i have script where the core relies on event being passed to it to work some stuff out but in one particular script i cant pass the event object because it goes to a server side script then back again... is it possible to spoof it - or even

[Proto-Scripty] Event#observe on elements

2009-10-06 Thread Ngan Pham
Hey everyone, I have a quick question. If put some Event#observe on an element...and then later remove the element with Element#remove, do I have to do Event#stopObserving? Or do the event detach themselves once garbage collection picks up the removed element? Thanks! --~--~-~--~~--

[Proto-Scripty] Event onDrop on Sortable class

2009-07-30 Thread Christophe
Hello, I am using the Sortable class for handling drag & drop between 3 different columns. In my code, I would like to trigger some method calls just after the drag is ended. I was then looking for an onDrop option, but it doesn't seem to be taken into account. Is this option supposed to be han

[Proto-Scripty] event handling on ajax.request. how to add new event.observes when new data loads

2009-04-29 Thread Stucture_Ulf
I'm using event.observe to handle event handling and my aim is to have these in separate .js files and initiated through the dom:onload function when the pages is loaded instead of onclicks in the html markup. I'm initializing additional event.observes by using oncomplete to attach new event.obse

[Proto-Scripty] Event Supressing

2009-04-24 Thread ferion
Hello Everybody, another Problem with my project. Our customer wants widgets without scrollbars. But the content of a widget might be larger than the display area of the widget itself. So we have to build ugly up and down Arrows which are scrolling the content. This works fine. In addition I try

[Proto-Scripty] Event Observers and Question on Copying Form Values Using Prototype

2009-04-23 Thread katz
Greetings. I need to learn how to achieve to dynamically copy form field values using Prototype or possibly Ruby. I want to achieve something like this: http://websitebuildersresource.com/2009/02/05/copy-form-input-data-to-another-input-field-with-jquery/ http://websitebuildersresource.com/demo

[Proto-Scripty] Event stopped when its source element is removed

2009-04-14 Thread Clément
Hi all ! I wonder if there's a way to forward an event when its 'source element' (target ?) is removed. In my use, I have two inputs. I'd like to DOM-remove one of them when it 'blurs'. Till now, when I click elsewhere in the page, no problem. Now I'd like to switch fields with "tab" or click b

[Proto-Scripty] Event bubbling in prototype 1.6

2009-02-04 Thread Vladimir Ghetau
Hi , In 1.6 version of prototype is missing, reasons are provided in documentation. There's been long discussions on how this should be achieved, is there any common practice of handling event bubbling using prototype? Best Regards, Vladimir Ghetau --~--~-~--~~~---~

[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] Event listeners in Ajax.InPlaceEditor

2008-09-17 Thread Tokeiito
Hello, is there a way to disable keyboard listeners in Ajax.InPlaceEditor? at the moment the only way i found is edit scriptaculous controls.js and add new option: DisableListeners({listeners to disable here}); Respecfully, Darius Tumas (a.k. Tokeiito) mob.: +370 631 13666 www.tokeiito.eu --~-