1

单击编辑信息按钮后,我有一个隐藏的 div 会显示在 facebox 模式窗口中。

<div id="editlog" style="display:none">
        <h3>Enter a new weight and/or photo.</h3>
        <form id="editlogform" action="editweight.php" method="post"  enctype="multipart/form-data">
            <input type="hidden" id="edittrigger" />
            <table width="400" cellpadding="0" cellspacing="6" border="0">
                <tr><td>New Weight.</td></tr>
                <tr><td><input type="text" name="weight" id="weight" maxlength="3" /></td></tr>
                <tr><td>New Photo</td></tr>
                <tr><td><input type="file" name="photo" /></td></tr>
                <tr><td><input type="button" value="submit" id="editlogsubmit" class="button"></td></tr>
            </table>
        </form>
    </div>

如您所见,它还传递了一张照片。这是提交表单的jquery。

$('#editlogsubmit').live('click', function() {
    $('#editlogform').ajaxSubmit({ 
        success: function(data) {
            alert(data.t);
        }
    });
});

我在服务器端我print_r()的变量,它们都是空的?如果我使用 jquery 使用 id 而不是名称来获取值,我只能传递一些东西。我认为这可能与 div 处于模态的事实有关,但我不确定。关于为什么变量为空的任何想法?

4

0 回答 0