花式框和提交按钮

时间:2012-11-27 07:14:55

标签: php javascript jquery fancybox

我在Fancy框中有一个提交按钮,但是当我按下它时它不会提交。这是我的标记。

<?php print \Fuel\Core\Form::open('user/search/find/constructor'); ?>
<ul class="other-region">
    /* bunch of forms inputs and selections */
</ul>

/*The submit form outside the fancy box modal*/
<?php print \Fuel\Core\Form::submit('Submit', '絞り込む',
        array('class'=>'redBtn positionRight','title'=>'絞り込む')); ?>

<!-- Start Hidden Divs for Modal -->
<div id="buildersMoreDetails" style="display: none;">
    <h2>詳細条件</h2>
        <table class="moreDetails">
                /* Also a bunch of input forms that are inside the modal */
                <tr>
                /* Submit button inside the Modal */
            <td colspan="2">
                    <?php print \Fuel\Core\Form::submit('Submit2', '検索',
                            array('class'=>'redBtn f-right','title'=>'検索')); ?>
                </td>
        </tr>
    </table>
</div>
<?php print Fuel\Core\Asset::js('jquery.fancybox.js'); ?>
<?php print Fuel\Core\Asset::css('jquery.fancybox.css'); ?>
<?php print \Fuel\Core\Form::close(); ?>
<script type="text/javascript">
$(document).ready(function() {
    $('.fancybox').fancybox({
        closeBtn: false,
        helpers : {
            title : null            
        }     
    });
});
</script>

模态中必须有取消提交按钮的内容。我想这样做而不诉诸Ajax,因为模态内部和外部的提交按钮的目的是相同的。

0 个答案:

没有答案