【问题标题】:Problem in using thickbox3.1 with rails..!使用带有rails的thickbox3.1出现问题..!
【发布时间】:2009-06-30 04:56:47
【问题描述】:

我正在使用 rails 来构建我的应用程序,我希望在单击特定链接时获得一个厚框..
我在我的部分中使用下面的代码,它显示在页面的一个部分中,点击用户名时,我需要厚框..当我使用下面的代码时,没有任何反应..
<%= link_to_function user.name,remote_function(:update=>"result", :url => {:action => :resultsuser}, :with => "'id='+#{user.id}+'&height=400&width=600'") %>
我已包含
<%= javascript_include_tag 'jquery' %>
<%= javascript_include_tag 'thickbox' %>
jQuery.noConflict()
<%= stylesheet_link_tag("thickbox") %>
并且还在thickbox.js文件中用jQuery替换了所有的$..没有任何反应..
请帮帮我。

【问题讨论】:

  • 单击用户名时,您是否在 Firebug 控制台中看到任何错误?
  • no.. 没有任何反应.. 高度和宽度的值存在于 post 变量中,结果显示在控制台响应中...

标签: ruby-on-rails thickbox


【解决方案1】:

你放了吗

jQuery.noConflict();

到脚本标签中?

【讨论】:

    【解决方案2】:

    尝试在link_to_function 辅助方法中添加类选项。

    <%= link_to_function user.name,remote_function(:update=>"result", :url => {:action => :resultsuser}, :with => "'id='+#{user.id}+'&height=400&width=600'", :class => "thickbox") %>

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-11-08
      • 2011-02-13
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2010-11-20
      • 2020-07-19
      相关资源
      最近更新 更多