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
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
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
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
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
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) {
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
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
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
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
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
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
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
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
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
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
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
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
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,
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
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,
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
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
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]
*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
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
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 ) -
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
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
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
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
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...
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
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:
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
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,
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
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 -
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
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
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
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
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:
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...
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
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
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
'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
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 =
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
50 matches
Mail list logo