search for: originalrequest

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

2006 Mar 03
3
xml handling
...t; /> <script type="text/javascript"> function getXML(){ var url = ''emperors.xml''; var myAjax = new Ajax.Request( url, { method: ''get'', onComplete: showResponse }); } function showResponse(originalRequest){ var xml = originalRequest.responseText; var x = xml.getElementsByTagName(''emperor''); $(''respuesta'').value = x[0].childNodes[0].nodeName; } </script> --------------------- regards -- // // Ing. Francisco J. Calderón S. // fjcalderon-Re5JQ...
2006 Apr 06
4
function onComplete how to overload?
...JAX Updater because result of Ajax Call is uploaded to the div that I defined earlier, and in my situations I don''t know id of my html element. I need to do something like this: funcion onComplete(originalResponse,param1) { if (param1 != something) $(''result'').value = originalRequest.responseText; else $(''resultSecond'').value = originalRequest.responseText; } How to achieve this? ---------------------------------------------------- W kwietniowym numerze "Zwierciadła" "3 x Malle" - płyty z filmami Louise Malle''a i konkurs z ce...
2006 Feb 21
2
Ajax status
Hello All. I''m making ajax call to some url but to connect and get data from that url first I check session for user which using AJAX. If session is expired I redirect Ajax call to other url. That url return form to login. There is one problem - I check in function onResponse(OriginalRequest) OriginalRequest status and status is always 200 - whatever I''m logged or not. So i can''t identify from what url i''m getting data. Can someone tell me what I''m doing wrong? ---------------------------------------------------- Zagraj o tytuł Króla Strzelców i...
2005 Dec 13
2
Ajax.Request onComplete
...*function*() { *// let''s serialize the content of the form* *// and send it to the server* *var* myAjax = *new* Ajax.Request(this.form_action, { parameters: Form.serialize(this.edit_form), onComplete: this.sendFormCompleted}); }, sendFormCompleted: *function*(originalRequest) { *var* result = originalRequest.responseText; *// we need to replace the form with the result* *// XXX How to get this here ??* this.rendered_node.innerHTML = originalRequest.responseText; } } The problem I have is that in sendFormCompleted, wich is called by the transport, I...
2008 Jan 30
3
Ajax.Request - nothing in responseText, I need it!!
...ata() { url = "http://www.myURL.com/updateData.php?myparams"; new Ajax.Request(url, { method: ''POST'', asynchronus: ''true'', contentType: ''text/html'', onComplete: parseData}); } function parseData(originalRequest) { myResponse = originalRequest.responseText; myDivID.innerHTML += myResponse; } ------------------------------------------------- when I include alerts in parseData to see if there is any content to responseText, it always comes back empty. What am I doing wrong here? Like I said,...
2006 Sep 19
1
Problem using POST with IE 6
...est.asp''; var pars = Form.serialize(frm); pars = pars + ''&time='' + new Date().getTime(); var myAjax = new Ajax.Request( url, {method: ''post'', parameters: pars, onLoading: '''', onComplete: showResponse} ); } function showResponse (originalRequest) { var newData = originalRequest.responseText; $(''responseholder'').innerHTML = newData; } The form is as follows: <form> <input type="hidden" name="id" value="1"> <input type="hidden" name="action" value=&quo...
2006 Feb 09
5
Ajax.Updater not populating element - please help
Hello everyone, This is related to my post a few days ago regarding multi select lists. I''ve rewritten the code and now can''t seem to get the Ajax.Updater in getModels() to "execute", and the element never gets populated. I know it''s something obvious and hope someone could point it out to me. Thanks for any help. Here''s my code: <script
2006 Feb 23
25
reloading fragments of pages
...the freshly updated treeview are not enabled anymore. They do work on other droppable parts. here''s the code that reload the treeview: *var* CPSPortletRefresher = Class.create(); CPSPortletRefresher.prototype = { initialize: *function*() { }, refreshPortletCompleted: *function*(originalRequest) { *// getting new positions from the server* result = originalRequest.responseText; *if* (result!='''') { $(this.last_portlet_id).innerHTML = result; *var* newdiv = document.createElement("div"); newdiv.innerHTML = result; newdiv.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.
2005 Oct 03
0
Prototype Ajax.Request (onLoading and onSuccess) question
...9;'div''); loading.id = ''loadingDIV''; loading.style.height = height + ''px''; loading.style.lineHeight = height + ''px''; loading.innerHTML = ''Loading&#8230;''; return loading; }, updateCalendar: function(originalRequest) { $(''calwrap'').innerHTML = ''<h2>Events Calendar</h2>'' + originalRequest.responseText; myxa.addListerners(); }, removeCalendar: function() { Element.remove($(''calwrap'')); } }; Thanks in advance, Faust
2006 Mar 07
1
Ajax.Responders- how to get responseText?
Hi All. In my site I have situation that I always want to execute some piece of code when AJAX call happen. I am using function onCreate and onComplete from tutorial:http://www.sergiopereira.com/articles/prototype.js.html but I don''k how to manipulate Ajax responseText in this function. Does anyone know how to do it? Gregor ---------------------------------------------------- Zagraj o
2006 Mar 08
4
Event.Observer - (was: Ajax.Autompleter not working on IE)
See if I can stir up a little life with a demo. I can''t believe that Ajax.Autocomplete doesn''t work on IE, so I *must* be doing something wrong. Trying to figure this out I added some alerts to control.js and it seems that IE is not getting the onkeypress events. So, here''s a demo: http://hank.org/demos/form.html That contains two fields with onkeypress events:
2006 Mar 17
10
good javascript xml parser
Anyone know of a javascript function that will take an xml document and turn it into an associative array? Basically it would take something like this: <body> <item> <id>1</id> <name>Bob</name> </item> <item> <id>2</id> <name>John</name> </item> </body> And turn it into something like this: {
2007 Mar 01
3
Ajax.PeriodicalUpdater using Effect.Highlight to highlight newly loaded div
...l = url + ''?StopCache='' + new Date; new Ajax.PeriodicalUpdater(id, url, { method: ''post'', frequency: 1, asynchronous: true, insertion: Insertion.Top, onSuccess: highlight, decay: 1 }); } var highlight = function(originalRequest){ new Effect.Highlight(''test''); } </script> <title></title> </head> <body onload="javascript:ajaxPopulater(''latest'',''/ajax.php'')"> <div id="latest"></div> </bo...
2006 Feb 13
1
Not able to see length in another function
...everyone, I have the following code that builds <option> into a <select>. buildModel() is called first, then setModel(). For some reason, I can''t get the length of the "model" options in setModel(), but can after they are built in buildModel(); function buildModel(originalRequest, json) { var model = $(''model''); //might need to clear options //model.options.length = 0; $H(json).each(function(node){ model.options[model.options.length] = new Option(node[0], node[1]); }); alert(model.options.length); // alerts the proper...
2006 Feb 08
29
Autocomplete and Firefox
Having problems with the autocomplete on my linux box and firefox. When I use form tags it breaks, without form tags everything works fine. Exact copy of the example provided, but I added form tags.. The initial search and select works but then the box sort of "locks up" and I can''t change it at all, If I do try to type something nothing changes but a second later the whole