社区
Ruby/Rails
帖子详情
submit_to_remote如何加入insertion选项?
cat_hsfz
2008-07-13 09:21:38
我想用Rails服务器端的submit_to_remote,同时我希望能够好像在客户端用Ajax.Updater那样,可以使用insertion来让response text插入到指定元素的前面或者后面而非里面。这应该怎么做呢?
...全文
148
7
打赏
收藏
submit_to_remote如何加入insertion选项?
我想用Rails服务器端的submit_to_remote,同时我希望能够好像在客户端用Ajax.Updater那样,可以使用insertion来让response text插入到指定元素的前面或者后面而非里面。这应该怎么做呢?
复制链接
扫一扫
分享
转发到动态
举报
AI
作业
写回复
配置赞助广告
用AI写文章
7 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
cat_hsfz
2008-07-26
打赏
举报
回复
[Quote=引用 4 楼 taito 的回复:]
用
:position => :before 目标元素的起始标签之前
:position => :top 目标元素的最顶端,紧跟在起始标签后面
:position => :bottom 目标元素的最后,正好在结束标签之前
:position => :after 目标元素的结束标签之后
如:
<%=link_to_remote "Add to cart", :url => {:action => "adds"},:update => {:success => "cart", :failure => "error" },:position => :bottom
%>
[/Quote]
原来这东西在Rails里面叫:position,而且我在API Doc里面还看不到,汗……谢谢了,我试用一下,没问题就结贴。
kuailetianren
2008-07-25
打赏
举报
回复
顶一下
cat_hsfz
2008-07-22
打赏
举报
回复
我知道怎么在Rails里面使用Prototype,我的意思是Rails的submit_to_remote方法如何能够设置insertion选项?
taito
2008-07-22
打赏
举报
回复
用
:position => :before 目标元素的起始标签之前
:position => :top 目标元素的最顶端,紧跟在起始标签后面
:position => :bottom 目标元素的最后,正好在结束标签之前
:position => :after 目标元素的结束标签之后
如:
<%=link_to_remote "Add to cart", :url => {:action => "adds"},:update => {:success => "cart", :failure => "error" },:position => :bottom
%>
taito
2008-07-22
打赏
举报
回复
用
:position => :before 目标元素的起始标签之前
:position => :top 目标元素的最顶端,紧跟在起始标签后面
:position => :bottom 目标元素的最后,正好在结束标签之前
:position => :after 目标元素的结束标签之后
如:
<%=link_to_remote "Add to cart", :url => {:action => "adds"},:update => {:success => "cart", :failure => "error" },:position => :bottom
%>
redcn2004
2008-07-21
打赏
举报
回复
ruby没用过,支持你一下
taito
2008-07-21
打赏
举报
回复
做法是一样的。 在view的头中加入<%= javascript_include_tag :defaults %>,客户端即可使用 rails 自带的 ajax prototype
PHP漏洞全解
<input type="
submit
" value="
Submit
"> ``` ##### 16. HTTP请求欺骗攻击(Spoofed HTTP Requests) **定义与原理:** HTTP请求欺骗攻击是指攻击者通过伪造HTTP请求(如使用curl等工具),使服务器执行非预期的操作...
(八)IT_开发常用单词大全
一批 be all about… 是关于… be aware to… 意识到… be of… 属于… be subject to… 服从… be taken to 被用于 be up to 取决于 bean [bɪ:n] n.豆 behalf [biˈhɑ:f] behave [bɪˈheɪv] v.表现 benefit ...
【Git】Git 分支管理 ( 解决分支合并冲突 | 前置环境准备 | 远程仓库发起分支合并 | 在远程仓库解决分支冲突 | 在远程仓库正式合并分支版本 )
文章目录 一、前置环境准备 1、克隆远程仓库 2、feature1... Total 3 (delta 0), reused 0 (delta 0), pack-reused 0
remote
: GitLab: http post to gitlab api /post_receive endpoint: 500 Internal Server Error To ...
Git学习
nothing to commit, working tree clean 说你的工作树是干净的,没东西需要提交了 可以通过 git reflog 查看引用日志信息 0b1dd9b (HEAD -> master) HEAD@{0}: commit (initial): first
submit
这就是之前提交的那个...
超全的英语短句汇集
open your books and turn to page 20. 打开书,翻到第20页。 21. i'll call the roll before class. 课前我要点名。 22. here! 到! 23. has everybody got a sheet? 每个人都拿到材料...
Ruby/Rails
2,764
社区成员
1,761
社区内容
发帖
与我相关
我的任务
Ruby/Rails
Web 开发 Ruby/Rails
复制链接
扫一扫
分享
社区描述
Web 开发 Ruby/Rails
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章