So I just asked a question then realised it was the completely wrong question!
所以我刚问了一个问题然后意识到这是完全错误的问题!
This is the form code I have
这是我的表单代码
<form id="bug-form" action="/AST_14/Bugg.ly2/index.php/bug/update/" method="post">
This form is a Jquerymobile page linked together.
此表单是链接在一起的Jquerymobile页面。
In the functions page I have this for the data being put into a table
在函数页面中,我有这个用于将数据放入表中
$('.listAllBugs').append('<tr class="table-stroke"><td>'+bugDetails+'</td><td><a href="#edit'+bug_id+'">Edit</a></td></tr>');
I'm needing the form url to have the bug_id
transferred over to the edit page. So at the moment the #edit
page doesn't update anything. I'm needing the ID to go after the update/
above.
我需要表单网址将bug_id转移到编辑页面。所以目前#edit页面没有更新任何内容。我需要ID来更新/上面。
Ideas?
1 个解决方案
#1
If all you want to do is append the bug_id
to the <form>
's action, then where you populate the table you can add:
如果您要做的只是将bug_id附加到
var $form = $('#bug-form');
$form.attr('action', $form.attr('action') + bug_id);
#1
If all you want to do is append the bug_id
to the <form>
's action, then where you populate the table you can add:
如果您要做的只是将bug_id附加到
var $form = $('#bug-form');
$form.attr('action', $form.attr('action') + bug_id);