Re: [Proto-Scripty] Re: event on leaving page

2013-01-10 Thread sreekala . a
I tried this code before window close.But again i get a pop up like This page is asking you to confirm that you want to leave - data you have entered may not be saved.Two pop-ups are not needed. window.onbeforeunload = function() { var r=confirm(Are you sure you want to navigate away?); if

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

2012-08-13 Thread Victor
Yes these are loaded properly, here are the include order of these file Can you verify this in your browser? Also, there may be syntax error in some of javascript files. Try to comment them one by one until error message (Uncaught Error: ExecJS::ProgramError: Unexpected token: operator

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

2012-08-10 Thread Victor
1. /assets/preload.js:1 http://yoopedia.dev/assets/preload.js 1. Uncaught ReferenceError: Form is not defined yoo:361http://yoopedia.dev/mainpage/yoo#_=_ 1. Uncaught ReferenceError: Form is not defined yoo:549http://yoopedia.dev/mainpage/yoo#_=_ 1. Uncaught

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

2012-08-10 Thread Imdad Ali Khan
Yes these are loaded properly, here are the include order of these file //= require prototype //= require prototype_ujs //= require effects //= require dragdrop //= require controls //= require ./yui/utilities //= require ./yui/tabview-min.js //= require ./main/base //= require

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

2012-08-09 Thread Victor
Form.YooEventObserver = Class.create({Abstract.EventObserver, { minQueryLength: 3, getValue: function() { // return YAHOO.util.Connect.setForm(this.element); //return Form.serialize(this.element); }, // ... other methods }); -- You received this message because you are

[Proto-Scripty] Re: Event fire bubbling

2011-09-08 Thread T.J. Crowder
Hi, On Sep 8, 4:33 pm, kstubs kst...@gmail.com wrote: 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) {  

[Proto-Scripty] Re: Event fire bubbling

2011-09-08 Thread kstubs
Working now! Losing my mind.. Sorry for the bother. -- 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.com/d/msg/prototype-scriptaculous/-/Tq7GMpyXzU0J. To post to this

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

2011-08-02 Thread Victor
Check e.keyCode. For numbers it should be in range 48...57, for letters a...z in range 97...122 (for Shift-a..z also 97...122, so you need extra check for Shift key). Other way is to use onkeypress event - it will have proper codes for a...z and A...Z, but is more browser-specific even with

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

2011-06-29 Thread T.J. Crowder
Hi, On IE, Prototype can't extend elements at the prototype level and so you have to extend them individually if you get/create them without going through Prototype. To do that, just pass the element through the `$` function: var newImg = $(document.createElement(img)); The reason you don't

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

2011-06-29 Thread Johan Arensman
TJ! How on earth can you do that so fast!? Do you have this reply as a template or something?? On Wed, Jun 29, 2011 at 10:31 AM, T.J. Crowder t...@crowdersoftware.comwrote: Hi, On IE, Prototype can't extend elements at the prototype level and so you have to extend them individually if you

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

2011-06-29 Thread T.J. Crowder
On Jun 29, 9:33 am, Johan Arensman johanm...@gmail.com wrote: TJ! How on earth can you do that so fast!? Do you have this reply as a template or something?? LOL I took typing in high school. Some of the best advice my mother ever gave me. :-) -- You received this message because you are

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

2011-06-29 Thread Edwin Allen
Thanks a lot guys you are awesome, I wish to have time to help as you did in my open source community. It works, know I have other problem tu solve if I need help, I''ll ask for it. On Wed, Jun 29, 2011 at 5:51 AM, T.J. Crowder t...@crowdersoftware.com wrote: On Jun 29, 9:33 am, Johan Arensman

Re: [Proto-Scripty] Re: event on leaving page

2011-03-11 Thread Richard Quadling
On 11 March 2011 01:17, joe t. thooke...@gmail.com wrote: One note on TJ's post, hopefully helpful: You cannot CANCEL the unload event. If i understand them correctly, load and unload are the only native events that can't be canceled from scripts. You can perform other actions, but unload

Re: [Proto-Scripty] Re: event on leaving page

2011-03-11 Thread Bertilo Wennergren
T.J. Crowder t...@crowdersoftware.com wrote: Yes, you can run functions using the window unload event. Example: http://jsbin.com/apuke4 Open that link in a tab, click Open Window, then close the tab you opened the link in -- the subordinate window closes as well. What you can do in those

Re: [Proto-Scripty] Re: event on leaving page

2011-03-11 Thread Walter Lee Davis
On Mar 11, 2011, at 7:41 AM, Bertilo Wennergren wrote: Here's a limitation with beforeunload (in case someone hasn't heard): More of less the only thing you can do with beforeunload, is to ask the user if he or she really wants to leave the page. A dialog will appear, and the user can choose

[Proto-Scripty] Re: event on leaving page

2011-03-11 Thread joe t.
Here's a sample from code that i wrote and seems to work ok (at least, last i tested it, i no longer work there), adapted for generics: http://pastie.org/1661648 So here's what i learned, now that my curiosity got roused... The beforeunload event will automatically generate the prompt. If you

Re: [Proto-Scripty] Re: event on leaving page

2011-03-11 Thread Walter Lee Davis
On Mar 11, 2011, at 7:50 PM, joe t. wrote: Here's a sample from code that i wrote and seems to work ok (at least, last i tested it, i no longer work there), adapted for generics: http://pastie.org/1661648 So here's what i learned, now that my curiosity got roused... The beforeunload event

Re: [Proto-Scripty] Re: event on leaving page

2011-03-10 Thread Walter Lee Davis
On Mar 10, 2011, at 2:25 AM, T.J. Crowder wrote: What you can do in those functions is severely limited by modern browsers (for all the good reasons you can think of). You can't open new windows, do alerts/confirms Thanks. This is the part I was remembering -- someone wanted an Are You

[Proto-Scripty] Re: event on leaving page

2011-03-10 Thread joe t.
One note on TJ's post, hopefully helpful: You cannot CANCEL the unload event. If i understand them correctly, load and unload are the only native events that can't be canceled from scripts. You can perform other actions, but unload means the browser has been committed to unloading that page,

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

2010-11-25 Thread Scrooge
ok, developed my own solution: Already when creating the elements that can be sorted within the different sortables, I add an extra attribute that stores a reference to the sortable the element is currently in. After a sort action the onUpdate event fires and compares whether all the elements in

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

2010-05-29 Thread Tobie Langel
The same thing happens for other 'delegated' events.  Is that the intended functionality? Yes. That's the very definition of event delegation. Best, Tobie -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group,

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

2010-05-29 Thread mmerlin
I don't think you understood my question. I understand that event delegation means that events bubble up from the element the event actually occurred on, to the ancestor element that the event [listener] was attached to. And that the events that reach that listener / handler are filtered based

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

2010-05-14 Thread T.J. Crowder
You can just use NWEvents and NWMatcher to define the event handler   and then use Prototype for the actual event handling. ...and in Prototype 1.7, you can swap NWMatcher in as the selection engine as well. One of the cool things about Prototype 1.7[1] is that you can use it with any of

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

2010-05-13 Thread T.J. Crowder
Hi, The `submit` event doesn't bubble on IE[1] (and yes, it has been 10+ years since the standard said it should[2]; what's your point? ;-) ), so you have to watch the form, not a container of the form, so your second script is your best bet and should work with IE *and* other browsers. [1]

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

2010-05-13 Thread Junkshops
*shakes fist at microsoft* So click events bubble but submit events don't. That makes loads of sense. Given that, the delegation solution above won't work for forms, so in that case is the only option to remove listeners prior to ajax loads that'd overwrite the listeners' elements? If so, I

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

2010-05-13 Thread Радослав Станков
Submit don't bubble but could be simulated. I have been working on simulating the bubbling for submit/reset/change/focus/blur, but I don't have any free time those days: (function(){ function isEventSupported(eventName){ var element = document.createElement(div), result; eventName = on

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

2010-05-12 Thread Радослав Станков
Event delegation is great solution + Prototype now have Element.on method. Another thing I want to mention here is that it seams that PrototypeJs now cleans the element event handlers automatically when using Element.update ( via new method Element.purge ) -

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

2010-05-12 Thread Junkshops
Hey guys, Thanks for the advice. I made the suggested changes, but now I've got a new problem - everything works fine in the good browsers, but, as usual, doesn't work correctly in IE8. The difference is that in IE8, instead of the output of the script replacing the contents of a div, the script

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

2010-05-11 Thread T.J. Crowder
Hi, I assume that if you don't, you wind up with a memory leak since you accumulate listeners on non-existent events. Your assumption is correct, and it's worse than you think: The elements themselves will stay in memory, too, not just the handlers. That can add up to a lot of memory

[Proto-Scripty] Re: Event ordering for cross domain frames

2009-12-10 Thread david
Hi sumit, as explain in the previous post, I have not tested any code, and could not do any test actually. Do you have any live page we can test? It could be easier this way :)) -- david On 9 déc, 13:36, Sumit skbrnwl-...@yahoo.com wrote: Hi, So i finally came up with protoype based

[Proto-Scripty] Re: Event ordering for cross domain frames

2009-12-10 Thread david
Hi sumit, !! repost, it seems that an error delete my previous response !! As I said, I did not have possibility to test what you're trying to do, Could we have a live page so that it will be easier to point the trouble ?? -- david On 9 déc, 19:36, Sumit skbrnwl-...@yahoo.com wrote: Hi, So

[Proto-Scripty] Re: event order part2

2009-11-30 Thread ColinFine
On Nov 27, 9:06 am, vtsuper vtsu...@gmail.com wrote: I have post a question beforehttp://groups.google.com/group/prototype-scriptaculous/browse_thread/... I would like to solve this problem accroding to this sitehttps://mootools.lighthouseapp.com/projects/2706/tickets/35-ie-s-atta...

[Proto-Scripty] Re: Event....

2009-10-29 Thread Alex McAuley
Sorry - disregard The function before the one called (the callee) has an event so i just did window.lastEvent=event instead so i can now access it Alex Mcauley http://www.thevacancymarket.com - Original Message - From: Alex Mcauley webmas...@thecarmarketplace.com To: Prototype

[Proto-Scripty] Re: Event#observe on elements

2009-10-07 Thread Matt Foster
Yeah don't worry about it. Your use case works fine, its the way IE handles event observers that has the memory leak. Other browsers its fine and as noted, prototype handles this IE anomaly under the covers for you so you're good. On Oct 6, 1:57 pm, Ngan Pham nganp...@gmail.com wrote:

[Proto-Scripty] Re: Event#observe on elements

2009-10-06 Thread Matt Foster
The removed element? Just because an element has been detached from the visible DOM doesn't mean that the reference can be maintained elsewhere. It would be no edge case to detach and re-attach a particular element, so to think that an element should be trashed just because it has no parent

[Proto-Scripty] Re: Event onDrop on Sortable class

2009-08-02 Thread Christophe
I have found something. For information, there is a callback onUpdate which seems to be called once the mouse is released (during the drag). Cheers, Christophe On Jul 30, 9:22 pm, Christophe cdebuss...@gmail.com wrote: Yeah... But I am using a sortable... What do you mean ? Cheers,

[Proto-Scripty] Re: Event onDrop on Sortable class

2009-07-30 Thread Alex McAuley
There is some options in draggable onEnd: function() {} HTH Alex Mcauley http://www.thevacancymarket.com - Original Message - From: Christophe cdebuss...@gmail.com To: Prototype script.aculo.us prototype-scriptaculous@googlegroups.com Sent: Wednesday, July 29, 2009 10:53 PM

[Proto-Scripty] Re: Event onDrop on Sortable class

2009-07-30 Thread Christophe
Yeah... But I am using a sortable... What do you mean ? Cheers, Christophe On Jul 30, 12:25 pm, Alex McAuley webmas...@thecarmarketplace.com wrote: There is some options in draggable onEnd: function() {} HTH Alex Mcauleyhttp://www.thevacancymarket.com - Original Message -

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

2009-04-29 Thread Richard Quadling
2009/4/29 Stucture_Ulf maximilian.moulet...@gmail.com: 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

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

2009-04-29 Thread BrentNicholas
I personally do something like this, though I have to wonder is it bad practice? I get the content with a request and use the callbacks to do what I need, seems to work fine. Though I wonder about observer clean up since I don't unregister them anywhere. function getSelectsForm() { new

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

2009-04-24 Thread katz
Walter Lee Davis wrote: On Apr 24, 2009, at 1:38 AM, katz wrote: On Event observers, I just realized it wasn't working because the html was only inserted upon calling Add new item variation. So it would definitely fail regardless of whether document.observe('dom:loaded',function() or

[Proto-Scripty] Re: Event Supressing

2009-04-24 Thread Richard Quadling
2009/4/24 ferion fer...@gmx.de: 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

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

2009-04-23 Thread Walter Lee Davis
On Apr 23, 2009, at 2:05 PM, katz wrote: 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:

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

2009-04-23 Thread RobG
On Apr 24, 4:05 am, katz bridgeuto...@gmail.com wrote: 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...

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

2009-04-23 Thread katz
RobG wrote: On Apr 24, 4:05 am, katz bridgeuto...@gmail.com wrote: 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

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

2009-04-23 Thread Walter Lee Davis
On Apr 24, 2009, at 1:38 AM, katz wrote: On Event observers, I just realized it wasn't working because the html was only inserted upon calling Add new item variation. So it would definitely fail regardless of whether document.observe('dom:loaded',function() or

[Proto-Scripty] Re: Event bubbling in prototype 1.6

2009-02-04 Thread Peter De Berdt
On 04 Feb 2009, at 15:39, Vladimir Ghetau wrote: 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? We're using an extra

[Proto-Scripty] Re: Event observing and memory

2008-09-21 Thread Mert Hurturk
'remove' function with an optional argument is very useful actually. Also I will try calling stopOberving() with just the element. Thank you all for your replies. On Sat, Sep 20, 2008 at 7:58 PM, kangax [EMAIL PROTECTED] wrote: On Sep 20, 4:48 am, Mert Hurturk [EMAIL PROTECTED] wrote: Hi

[Proto-Scripty] Re: Event listeners in Ajax.InPlaceEditor

2008-09-17 Thread bluezehn
What do you mean by keyboard listeners? Do you mean observers to the onkeyup action? Why would you want to do this? As a side note it's much better to extend the inPlaceEditor than edit the source code. You can extend classes like this (if you didn't know already!): Ajax.MyInPlaceEditor =

[Proto-Scripty] Re: Event listeners in Ajax.InPlaceEditor

2008-09-17 Thread Tokeiito
I need that cause with one External Control button, user opens three edit boxes and if user hits enter or esc submits/cancels only that fields where user worked at the moment. Will try to extend that class. Thank you. Respectfully, Darius Tumas (a.k. Tokeiito) mob.: +370 631 13666