我試圖實現與Rails和的fancybox的東西,但似乎很難做到......Rails 3中通PARAMS到的iFrame的fancybox
在我的申請,我有一個像的link_to功能:
<% @factures.each do |facture| %>
<tr>
<td><%= facture.numero %></td>
<td><%= facture.date %></td>
<td><%= facture.contact %></td>
<td><%= facture.journal_id %></td>
<td class="fancybox"><%= link_to 'Ajouter un paiement', new_facture_paiement_path(:facture_id => facture.id) %></td>
然後我有打開一個模式的iframe的fancybox jQuery的代碼鏈接時,在用戶點擊:
$(function() {
$('.fancybox').fancybox({
'type' : 'iframe',
'href' : '/facture_paiements/new'
});
});
模態的fancybox打開就像一個魅力,但我不能找到一個辦法讓帕拉姆:facture_id預填充在我的模式框中相應的字段...
是否有可能通過javascript傳遞參數到iframe fancybox?
感謝
fancybox是什麼版本? – JFK 2012-03-18 21:49:53