开发者

"Ajax not found" when adding submitToRemote in gsp

When I add sub开发者_运维知识库mitToRemote to my gsp I Firebug gives me an "Ajax not found" error. I have the jquery library loaded. How do I use submitToRemote with JQuery?

 <g:javascript library="jquery-1.4.2.min"/>
 <g:javascript library="jquery-ui-1.8.4.custom.min"/>
  .
  . 
  .
 <g:submitToRemote controller="DefaultSearchController" action="search" value="Search" onSuccess="updateResults(searchResults)"/>


Need to includue the appropriate tag

how to use jquery for AJAX in Grails

http://www.grails.org/Ajax

http://www.grails.org/Tag+-+javascript

is the javascript tags included on the page?


You need the jQuery JavaScript provider for the Ajax calls to work properly (or other tags that normally work with Prototype for that matter).

Check out http://www.grails.org/plugin/jquery

M.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜