search for: onsuccess

Displaying 20 results from an estimated 99 matches for "onsuccess".

2006 Jun 30
2
Ajax.Request synchronization (onSuccess before onComplete?)
2 questions regarding the synchronization of these events. 1) is onSuccess called before onComplete ( I assume it is) 2) if called after, is onComplete called after the onSuccess method has completed or are you at the mercy of synchronization issues? Hopefully someone can enlighten me. I tried reading the Prototype.js but couldn''t seem to determine th...
2006 Oct 04
0
onSuccess and onComplete Prototype callbacks
Hi everyone, The onSuccess callback gets fired when HTTP status code is 200, and onComplete gets fired AFTER onSuccess/onFailure when the browser has finished handling the request, i.e. when the DOM is ready, right? So my question is where to put code that MUST ONLY be executed if HTTP status code is 200 AND Ajax.Request was...
2006 Jan 25
10
Ajax.InPlaceEditor onSuccess: ???
I''m looking for onSuccess: in Ajax.InPlaceEditor, but it doesn''t appear to exist. onComplete isn''t what I need because I only want my callback on success. Is there a way to do this? Thanks, Jamie
2006 Feb 21
1
RE: [Prototype] onSuccess Event and, Ajax.Updater bug in IE
...etting the same bug in IE. Currently, it''s Content-Type: text/html Any other suggestion? Nathan. > Message: 2 > Date: Mon, 20 Feb 2006 09:13:57 -0500 > From: "Joe Hudson" <joe-x8g0hQFNjJhWk0Htik3J/w@public.gmane.org> > Subject: RE: [Rails-spinoffs] [Prototype] onSuccess Event and > Ajax.Updater bugin IE > To: <rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org> > Message-ID: <20060220141403.6ECA539A67-hapML+lR5zQf0INCOvqR/pqQE7yCjDx5@public.gmane.org> > Content-Type: text/plain; charset="us-ascii" > > I'...
2006 Feb 20
1
[Prototype] onSuccess Event and Ajax.Updater bug in IE
...ta.innerHTML + ''&input-text='' + input.value; 4. new Ajax.Updater(''nutrients'',''fooddb/browser/nutrients'', {method : ''get'', parameters : pars, onFailure: reportError, onComplete: reportComplete, onSuccess: reportSuccess}); 5. } 6. function reportError(request) 7. { 8. alert(''Sorry. There was an error.''); 9. }...
2005 Oct 27
5
Problem passing event object
Hi all, I''m having a problem with an Ajax.Request. I can''t figure out how I can pass an event (an onclick on a checkbox) which causes the Ajax Request, to be recognized in an onSuccess function. Here''s my simplified code: var RequiredField = Class.create(); RequiredField.prototype = { initialize: function(chkbox) { this.chkbox = chkbox; this.chkbox.onclick = this.switchRequired.bindAsEventListener(this); }, switchRequired: function(evt) { this.evt = evt; // S...
2005 Oct 03
0
Prototype Ajax.Request (onLoading and onSuccess) question
...new/?cur_month=2005-11>'') month links are clicked . http://luther.edu/new/ It seems to work fine if I don''t call anything onLoading. http://luther.edu/new/noonloading.php When I do call something onLoading, sometimes it gets stuck and never makes it to the function I call onSuccess. Any idea what I am doing wrong? Could I be running up against a race condition? I guess I am assuming that onLoading will always be called and finish before onSuccess. Here is some of the relevant code: var myxa = { [...] ajaxUpdate: function(month) { var url = ''/new/myxaajax.p...
2008 May 21
6
this.initialize has no properties error in Prototype Code
...ng to implement my first solution using it. This is my code: var span = ''totalViews'' + video_id; var params = ''video_id='' + video_id; Ajax.Response(''trackVideo.php'', { method: ''post'', parameters: params, onSuccess: function(transport) { var count = transport.responseText; $(''span'').innerHTML = count; Mediabox.open(video_url, '''', ''mediabox[480 380]''); }, onFailure: function() { alert(''I Fudged Things.&...
2007 Sep 27
4
transportXML returns null?
...splay() { url = "http://" + location.hostname + port + "/fusion/ restlet/"; url = url + "engines" + sServer; new Ajax.Request(url, { method:"get", contentType:"application/xhtml+xml", onSuccess: function(transport) { var response = transport.responseXML; // null ? //var response = transport.responseText; // OK alert("after response=" + response); if (response != null) { alert("b=" +...
2006 Aug 17
2
link_to_remote option :onsuccess, execute js function
How should I define the :onsuccess option in my - link_to_remote - tag, to execute a Js function I wrote : :success => "toggleButton(this, /db_bfilter/i);" ''this'' is the current element defined in my view : <span id="db_bfilter0" class="depressed"><%= filter_link_helper...
2006 Feb 14
7
onFailure fails?
Hi all, I have this code: new Ajax.Request(''non_existant.file'', { onSuccess:function(){alert("yay");}, onFailure:function(){alert("boo");} }); Why does the onFailure alert never get called? It works fine if I use a real file (onSuccess gets called). Thanks, Douglas
2006 Jun 28
12
Ajax.Updater
Hi, someone can help me, I am ot able to find the way how to user Ajax.updaterto test if the request give some positive or negative result. I am able only to return the result inside a div. An example is appreciated. _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
2007 Jun 16
3
Help with effect queue.
...e this - and please assume that variables used in the code snippet below are defined in non-quoted parts of this code: <code> new Ajax.Request(url, { method: ''get'', onFailure: function(transport) { $("update_message").update(transport.statusText); }, onSuccess: function(transport) { new Effect.BlindUp(content, {queue: ''front'', scope: id} ); new Element.update(content,transport.responseText, {queue: ''end'', scope: id} ); new Effect.BlindDown(content, {queue: ''end'', scope: id} ); } }); <...
2005 Dec 05
3
Effect.Highlight on Ajax.Updater
Hello to all list members... Exchuse for my bad english, I don''t write english very well. I''m searching for a solution to hilight a div when his value change. The value in these div is take from Ajax.Updater . the code is: new Ajax.Updater(''acc'',''tools/head_info.php'',{asynchronous:true}); and have a settimeout to recall it every 5 seconds.
2008 Aug 10
1
Prototype, JSON and headers
...4, PHP 5.2.5 by entropy.ch, Apache 2.2 Apple''s default) after trying different approaches, I finally got JSON to work using this: <?php $json = json_encode($status); header(''X-JSON:(''.$json.'')''); ?> and my javascript to handle the JSON response: onSuccess: function(transport,json) { Beautiful, works great, on my Mac at least When I upload this to the server, it doesn''t work. I don''t know what kind of machine it is, but it is running PHP 5.2.0 and Apache 2.2 and probably Linux. After a few hours of searching on the net and trial/er...
2009 Jun 14
3
Basic AJAX Response (Mootools)
...it moronically simple and just add a node to see that it works, yet the response doesn''t come through / isn''t interpreted as it should. Long story short, code : // Have to use Mootools to integrate a Moo-specific JS Script // @.js : new Request( { url: ''bla'' onSuccess: function(responseText, responseXML) { console.warn(responseText); console.warn(responseXML); } , onFailure: function(xhr) { alert(STD_ERR); } }).send(); // @SomeController : respond_to do |format| format.html { head :ok } format.xml { render :xml =>...
2007 Jun 04
2
Re: Ajax.Request question with JSON return
...#39;' + passSID ; > > new Ajax.Request() > var url = > ''/SShow/Model/AjaxCalls/sshow_caller_populateRef.cfm''; > new Ajax.Request(url, { > method: ''get'', > onSuccess: function(transport, json) { > alert(json ? Object.inspect(json) : "no JSON object"); > // no alert displays when I try this > } > }); > > <!-- this does return the string from the server and populate a DOM >...
2008 Jan 04
6
Ajax.Request: onFailure vs. onException
Hello All, I''m trying to capture the exception message that my server application is providing in response to my Ajax.Request. However, I''m confused as to when onFailure is fired vs. onException. The onException handler has access to the javascript exception object and I''d understood that it was only called when the dispatch fails. Not sure what exactly that means
2006 May 24
5
Ajax.RssReader object
...lert(rss.channel.title); for(n=0; n<rss.items.length; n++) { alert(rss.items[n].title); } } function myErrorHandler( rss ) { alert( ''An error has occured.'' ); } new Ajax.RssReader( ''http://www.mysite.com/feed.xml'', { onSuccess: myCallbackFunction, onFailure: myErrorHandler } ); Please send me your comments and suggestions. Best, Robin _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listi...
2007 Nov 20
3
Ajax.Updater -- Cancel DOM write?
Is it possible to cancel the DOM write to the element passed to Ajax.Updater? I didn''t see anything in the documentation, and I''d like to use this instead of Ajax.Request. There are situations where the results that are returned will not be what is expected, and I have no control over this. For this reason, I''d like to be able to cancel writing to the DOM. Thanks in