1

我的 Drupal 网站有问题。我正在使用 Colorbox 加载订阅表单,但表单焦点丢失。示例可在http://luchshieceni.ru/

window.jQuery(document).ready(function($) {
$('.colorbox5').colorbox({open:true, inline:true, href:'div#content5'});
});

这是表格

<form class="sr-box" method="post" action="https://smartresponder.ru/subscribe.html" target="_blank" name="SR_form_63724_75">    
<input type="text" name="field_name_first" class="form-txt" value="Ваше имя" onfocus="value='';">
<input type="text" name="field_email" class="form-txt" value="Ваша электронная почта" onfocus="value='';">
<input type="submit" value="Подписаться" name="subscribe" id="" class="sub-btn">                    
        </form>

你能帮帮我吗?提前致谢!

4

1 回答 1

2

I had the same problem. I followed your advice on Drupal forum (double post of the same question), and yes, it fixed my problem as well. I had:

$(popup).colorbox({rel:'nofollow', preloading:false, open:true, inline:true, href:popup, scalePhotos:false, iframe:true, arrowKey:false, transition:"none", slideshow:false });

Fixed it with:

$.colorbox({rel:'nofollow', preloading:false, open:true, inline:true, href:popup, scalePhotos:false, iframe:true, arrowKey:false, transition:"none", slideshow:false });

The jquery selector CAN'T be the same as a href.

This is very obscure, and not documented anywhere. And causes major problems. So I hope it helps someone.

于 2013-08-30T08:32:07.830 回答