0

我正在使用颜色框打开弹出窗口#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.

任何想法如何解决这个问题?

谢谢!

4

1 回答 1

0

当您将颜色框放入另一个颜色框时,一切似乎都正常,请参见此处的实时示例

<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%"});
于 2013-02-11T16:42:20.757 回答