Other than ensuring the routing (which seems to be connecting to some action or other), I recommend you also check the submit button you are using.
The form remote tag builds a form which has a javascript method called onsubmit() which is what submits the ajax form. If you use some type of custom submit button that one way or another calls form.submit (how non ajax forms are submitted) rather than onsubmit, then you will get what you are seeing now, with the javascript response shown as a page. On Mar 16, 6:57 am, Tom Z Meinlschmidt <[email protected]> wrote: > try to add :method=>:get into your form_remote_tag ... > > <% form_remote_tag ( > :url => {:controller => "networks", :action => 'search'}, > :method => :get, > :update => 'searchResults', > :loading => "Element.hide('goBtn'); Element.show('fts-loader')", > :complete => "Element.show('goBtn');Element.hide('fts-loader');") do > %> > > tom > > > > Tam Kbe wrote: > > <form onsubmit="new Ajax.Updater('searchResults', '/network/search', > > {asynchronous:true, evalScripts:true, > > onComplete:function(request){Element.show('goBtn');Element.hide('fts-loader'); > > }, onLoading:function(request){Element.hide('goBtn'); > > Element.show('fts-loader')}, parameters:Form.serialize(this)}); return > > false;" method="post" action="/network/search"> > > <table cellpadding="0" border="0" bgcolor="#e5e5e5"> > > <tbody> > > <tr> > > <td> > > <span class="headerTextGreen">Search </span> > > </td> > > <td> > > <input id="search_phrase" class="search-box" type="text" value="" > > size="20" name="search_phrase"/> > > </td> > > <td width="20"> > > <input id="goBtn" class="btnSearch" type="image" > > src="/images/btnGo.gif?1237061985"/> > > <img id="fts-loader1" width="15" height="14" style="display: none;" > > src="/images/searchWait.gif?1237061985" alt="Searchwait"/> > > </td> > > </tr> > > </tbody> > > </table> > > </form> > > > Thanks Tom... > > > Cheers, > > Tam > > -- > =============================================================================== > Tomas Meinlschmidt, MS {MCT, MCP+I, MCSE, AER}, NetApp Filer/NetCache > > www.meinlschmidt.com www.maxwellrender.cz www.lightgems.cz > =============================================================================== --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---

