Hello Akaballa

   Well as long as I understand prototype ajax request you need to add 
"asynchronous: false, " in you ajax request definition.
    So try like this:
      new Ajax.Request('some url',
{
               asynchronous: false, 
method:'post',
parameters: {searchString: searchQuery},
onSuccess: function(transport)
{ 
var str = transport.responseText || "no response text";
$('searchResponse').update(str); 
 },
onFailure: function()
{
alert('Unable to retrieve requested data. Please try again.');
}
 });



Let me know if it still creates problem for you.
On Wednesday, 22 October 2008 19:49:30 UTC+5:30, akaballa wrote:
>
> Well I implemented what you said and debugged my code through firebug 
> and found out that the request is not sent because of the following 
> error: 
>
> Prototype is not defined 
> dispatchException()Prototype.js (line 1355) 
> respondToReadyState()Prototype.js (line 1322) 
> onStateChange()Prototype.js (line 1249) 
> bind()Prototype.js (line 214) 
> [Break on this error] (this.options.onException || 
> Prototype.emptyFunction)(this, exception); 
>
> i did not make any changes to the prototype.js file.  So I have no 
> idea what the problem is. 
>
> On Oct 22, 8:18 am, Baglan <baglan....@gmail.com> wrote: 
> > I see an error in your code which could have prevented it from working 
> > at all; the ',' (comma) after the onSuccess function definition is 
> > missing (happens to me all to frequently :)) - could that be the issue 
> > or is it a typo? 
> > 
> > I'd suggest you to use some kind of debugger for spotting that kind of 
> > issues. Personally, I'm using FireBug for Firefox - it shows if there 
> > were any Javascript errors and lets you inspect AJAX requests easily. 
> > 
> > - Baglan 
> > 
> > p.s. Here's the link for the Firebug: 
> > 
> > https://addons.mozilla.org/en-US/firefox/addon/1843

-- 
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/-/W8Rbn15ThIwJ.
To post to this group, send email to prototype-scriptaculous@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.

Reply via email to