search for: eventobserver

Displaying 16 results from an estimated 16 matches for "eventobserver".

2005 Nov 04
1
prototype EventObserver on radio option elements
Hi all, I just started using prototype 1.3.1. I''ve successfully used Form.Element.EventObserver on a select list and recently tried to add it to radio options. However, I think there is a flaw in how it works with radio options. Radio options are a little unusual in that there are multiple distinct elements, tied together by a common name, where changing one element causes a change to a...
2006 Feb 07
1
Help needed with conflicting EventObserver
Hello everyone, I have a page that populates/updates make, model and year select lists via Ajax.Updater and I think that an EventObserver is causing a conflict. Here''s what I''m trying to do. I''m using this page as a create and edit page for a car database. If I''m calling the page in edit mode, I''ll want the make, model and year set (using the setMake(), setModel() and setYear() function...
2005 Aug 22
8
Observing changes to a text field
I''ve noticed that using several TimedObservers (prototype.js) on a page to watch for changes to text fields (haven''t tried forms) can have a non-negligible effect on the CPU cycles used by the browser process. Nothing dramatic, to be sure, but unnecessary. Autocompleter.Base (controls.js) follows a smarter strategy to watch for changes. Currently this functionality is tied
2006 Apr 09
0
Form.EventObserver Incorrect?
After playing with Form.EventObserver for a while, I wonder if it shouldn''t pass the element that triggered the event to the callback instead of the form object itself. Although we pass the form object to the constructor, we are monitoring changes of individual elements. As it stands, there isn''t any way to...
2006 Nov 28
1
observe_form, observe_field, dynamic forms help
...the first ''click'' It was suggested that I stop observe_field before changes are made to the form then restart it. With much searching I found a Event.stopObserving method, but I''m not certain how to apply this to my observe_form observer. >From the source: new Form.EventObserver(''process_call_form'', function(element, value) {new Ajax.Request(''/rails/assistant/add_element'', {asynchronous:true, evalScripts:true, parameters:''Form.serialize(process_call_form)='' + value})}) >From this I did: function = "function(el...
2010 Dec 02
2
foreman dropdown menu broken
Hi, i just installed foreman from the git repository and the dropdown menu does not work. Don''t know xhtml well but opera tells me: Uncaught exception: ReferenceError: Undefined variable: Form Error thrown at line 3, column 0 in http://130.149.58.152/: new Form.Element.EventObserver(''settings_dropdown'', function(element, value) {window.location.href = value;}) This is on Apache/2.2.17 (FreeBSD). I tried multiple Browser''s on multiple OS''s. Would be happy to supply more info''s. Greetings, Leon
2007 Nov 12
15
If form changed ask if you really want to exit page...
First things first: Hi all! I''ve been sucked into prototype and script.aculo.us develpment thanks (because of?) the Symfony PHP framework... I''d like to implement a feature on some admin pages, but I can''t seem to find the right search term to google it; I want to ask the user to confirm exit of a page, if she has changed anything on the forms displayed on it. I have
2006 Apr 26
6
Immediate help needed
I have posted this previously also but haven''t received any help. So, if somebody could look into it and guide.. I want to validate the extension of files that I am uploading. Like I want only the doc/pdf files to be uploaded.. Thanks in advance. -- Posted via http://www.ruby-forum.com/.
2006 Apr 15
0
Ticket #4140? observe_field issue.
Take these two basic bits of HTML. <input id="user_email" name="user[email]" size="30" type="text" value="" /> <script type="text/javascript"> //<![CDATA[ new Form.Element.EventObserver(''user_email'', function(element, value) {new Ajax.Request(''/account/validate_user_email/0'', {asynchronous:true, evalScripts:true, parameters:''user_email='' + value})}) //]]> </script> and <input id="user_first_name" name=&...
2009 Jun 14
6
Unable to make observe_field work
...ck %> <%= javascript_include_tag :defaults %> Raises the error:Can''t find variable Form. The generated html is: <input id="friend" name="friend" type="text" /> <script type="text/javascript"> //<![CDATA[ new Form.Element.EventObserver(''friend'', function(element, value) {new Ajax.Request(''http://mysite.com/friendships'', {asynchronous:true, evalScripts:true, parameters:value + ''&authenticity_token='' + encodeURIComponent(''...edited...'')})}) //]]> </sc...
2006 Jul 19
1
Catch 22 with after_save. Please help.
...been committed. That exception then rolls back the transaction, creating a catch 22. So basically what I''m asking if there an after_after_create method? ha ha. Basically a method that gets called after the transaction is committed. Also, in case you were wondering I did set up an EventObserver and get the same exact problem. Lastly, I can not pass the object because AnotherClass is in a background process and passing methods between processes is not permitted. I''m using backgroundrb for this. Any help is greatly appreciated. Thank You, Ben Johnson E: bjohnson@contuitive...
2005 Sep 08
1
Browser support and the increasing # of js frameworks
I''m wondering what other folks think of Dojo (0.1 just released), MochiKit, and some of the other js frameworks relative to prototype/scriptaculous (p/s). P/S seems to have broader support although I''m not sure about IE 5.5 in the other frameworks. A second question is related. I''ve got some AJAX working with prototype + behaviour, and I''m building in refresh
2008 Apr 03
0
ActiveRecord::Observers?
...over from daemon-generator to backgroundrb, with much more control and power. it''s awesome. the only problem is that we can''t seem to get the observers to load. in my worker, I go like this: def create(args = nil) ActiveRecord::Base.observers = :event_observer EventObserver.instance end which indicates it''s loaded, but it doesn''t seem to trigger itself. does anybody have any known issues with observers not observing? also, I''m a bit confused about how/when it loads environment files - does it load the environment/production.rb file...
2006 Apr 27
5
Realtime Form Validation Plugin Available
Granted, I''m still very much a newbie, but after reading an article on AJAX that basically states at one point that just because you can use AJAX doesn''t always mean you should, I have to ask: Why bother contacting the server (even if it is an insignificant amount of bandwidth) to validate the sanity of form data (unless you''re actually validating against something in
2006 Jan 23
7
Tooltips.js
Hi, there already had been a Tooltips implementation [1] but i wasn''t to happy with that one, not only because they didn''t support simple mouse-hover tooltips (just as they appear when you are using title attributes) But writting this lib was also a good way to get into script.aculo.us and prototype.js. (and i can''t say how impressed i am) So here it is: An all
2005 Jul 06
16
Autocompletion not working in Konqueror
I''ve just had a look again at the autocompletion demo that Thomas put up at http://script.aculo.us/demos/ajax/autocompleter Unfortunately, in Konqueror (3.4.1) it doesn''t work at all. Not even an error is triggered. It does work nicely in Firefox. How about Safari? I don''t have the time right now to track this down systematically (maybe latter), but just from