创建表单弹出窗口使用灯箱弹出窗口

时间:2015-10-14 05:43:01

标签: javascript jquery

我正在使用灯箱弹出窗口创建表单弹出窗口

这是我的代码:

<div id="vendor-popup" style="display: none;background:white;">
    <div style="clear:both;padding:10px;">
        <div><h3><?php echo $this->__('Contact Form');?></h3></div>
    </div>
    <form id="contact_vendor" action="" method="post">
        <p>
            <label class="required" for="name"><em>*</em><?php echo $this->__('Full Name');?></label>
            <input type="text" class="input-text required-entry" title="Name" id="name" name="name" value="">
        </p>
        <div class="buttons-set">
            <p class="required"><?php echo $this->__('* Required Fields');?></p>
            <input type="text" style="display:none !important;" value="" id="hideit" name="hideit">
            <button class="button" title="Submit" type="submit"><span><span><?php echo $this->__('Submit');?></span></span></button>
        </div>
    </form>
    <div class="popup-content-block"></div>

</div>
<script type="text/javascript">
    var newContactForm = new VarienForm('contact_vendor', true);
</script>
<button onclick="showPopUp();" class="button" type="button"><span><span><?php echo $this->__('Contact To Vendor') ?></span></span></button>
<script type="text/javascript">
    //<![CDATA[
    function showPopUp(){
        jQuery.fancybox.open('#vendor-popup',{
            width : 'auto',
            height: 'auto',
            openEffect  : 'elastic',
            closeEffect : 'elastic'
        });
    }
    //]]>
</script>

这显示我正确的弹出窗口,但是当我在控制台中检查表格标签时是不显示任何地方如何解决这个问题

0 个答案:

没有答案