colorbox Jquery插件,试图打开第二个弹出窗口



我正在使用颜色框打开弹出窗口#1:

<li class="getquotebtn"><a href="<?php bloginfo ('template_directory'); ?>/get-quote.php?productID=<?php echo $post->ID; ?>">Get Quote</a></li>

和jquery:

$('.getquotebtn a').colorbox();

这很好用。但我在get-quite.php的内容中有另一个按钮,我想打开另一个弹出窗口。。。

<form name="getquotedata" action="" method="post">
        <input type="text" name="nameandsurname" id="popupnamefield" onblur="this.value=!this.value?'<?php _e('Name and Surname','medishop'); ?>':this.value;" onfocus="this.select()" onclick="if (this.value=='<?php _e('Name and Surname','medishop'); ?>'){this.value='';}" value="<?php _e('Name and Surname','medishop'); ?>">
        <input type="text" name="email" id="popupemailfield" onblur="this.value=!this.value?'youremail@domain.com':this.value;" onfocus="this.select()" onclick="if (this.value=='youremail@domain.com'){this.value='';}" value="youremail@domain.com">
        <input type="hidden" name="prod_ID" value="<?php echo $productID_from_url; ?>">
        <input type="hidden" name="prod_name" value="<?php echo get_the_title($productID_from_url); ?>">
        <input type="hidden" name="prod_url" value="<?php echo get_permalink($productID_from_url); ?>">
            <input type="submit" value="Get Quote" id="popupsbmt" onclick="$.colorbox({href:'<?php bloginfo('template_directory'); ?>/get-quote-sendmail.php'}); return false;">
    </form>

这就是问题的根源!

我得到错误:This content failed to load.

有什么办法解决这个问题吗?

谢谢!

当你把一个颜色框放在另一个里面时,一切似乎都很好,请参阅这里的示例。

<a class='inline' href="#inline_content">Inline HTML</a>
<div style='display:none'>
    <div id='inline_content' style='padding:10px; background:#fff;'>
        <a class='inline2' href="#inline_content2">open second</a>
    </div>
</div>
<div style='display:none'>
    <div id='inline_content2' style='padding:10px; background:#fff;'>hi second</div>
</div>

js:

$(".inline").colorbox({inline:true, width:"50%"});
$(".inline2").colorbox({inline:true, width:"50%"});

最新更新