对话框的内容不加载在一个页面上 [英] dialog content not loading on one page

查看:99
本文介绍了对话框的内容不加载在一个页面上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

症状 这适用于一个字preSS博客的地方有一个用于激活包含一个对话一个链路表单。链接和对话可在网站的任何页面上。他们都是由设置站点的审阅的cookie被激活。

Symptoms This applies to a Wordpress blog where there is a link that is used to activate a dialog containing a form. The link and the dialog are available on any page on the site. They are activated by a cookie that is set for site reviewers.

  1. 在条件1 - 第一次访问该主页的内容将不会在对话框
  2. 加载
  3. 在条件2 - 在第一次去任何其他比主页和对话内容将正常加载其他主要页面
  4. 在条件3 - 在第一次去任何比主页其他主要页面,然后返回到主页。内容将加载到对话框中按预期的方式。
  5. 在条件4 - 先进入主页,然后重新加载页面。内容将不会加载。

问:我在寻找可能的问题来源的想法

Question: I'm looking for ideas on possible sources of the problem.

其清晰的看萤火,该.load功能未加载内容的页面,见下文。不过,我没有足够的知识,在使用萤火来检测一下可能会造成问题。 还需要注意的是,这不是一个cookie的问题。这个cookie显示的链接对话框,该部分工作完美。

Its clear from looking at firebug that the .load function is not loading the content to the page, see below. However, I'm not knowledgeable enough at using firebug to detect what might be causing the problem. Note also that this is not a cookie problem. The cookie reveals the link for the dialog and that part is working perfectly.

脚本加载内容

jQuery(document).ready(function ($) {
$('#testform a').each(function(){
    //set up variables
    var cancel = function() {
        $dialog.dialog('close');
    };
    //identify link to feedback form
        $link=$(this);
    //dialog variables
        $dialog=$('<div id="form1container"></div>')
        .load($link.attr('href') + ' #form_container' ,function(){
            var testformoptions = {
                    target : "#output1",
                    url:    'http://www.business-navigation.com/value/review/form1_processing.php',
                    clearForm:  'true'
            };
            var form2options = {
                    target : "#output2",
                    url:    'http://www.business-navigation.com/value/review/form2_processing.php',
                    clearForm:  'true'
            };
            var form3options = {
                    target : '#output3',
                    url:    'http://www.business-navigation.com/value/review/form3_processing.php',
                    clearForm:  'true'
            };
            jQuery('#myform').ajaxForm(testformoptions);//prepare form
            jQuery('#error_in_text').ajaxForm(form2options);//prepare form2
            $('#confusing_layout').ajaxForm(form3options);// Prepare form 3
            return false;
        })
        .dialog({
            autoOpen:   false,
            buttons: { "Close": cancel, "Cancel": cancel},
            title:  $link.attr('title'),
            width:  600

        });
        $link.click( function (){
            $('div#output1, div#output2, div#output3').empty();
        });
        $link.click( function(){
            $dialog.dialog('open');
            $( "#accordion" ).accordion({
                collapsible: true,
                active: false,
                fillSpace: true,
                clearStyle: true
            });
            return false;
        });
});
});

这是问题的可能来源的任何意见或想法会大大AP preciated。

Any ideas or thoughts on the possible source of the problem would be much appreciated.

感谢。

推荐答案

如果你使用Firefox(你提到的萤火虫)你使用F5键刷新大概页面。尝试使用Ctrl + F5键,并检查它是否正常。

if you use Firefox (you mentioned firebug) you probably reload page using F5. try use ctrl + F5 and check if it's OK.

这篇关于对话框的内容不加载在一个页面上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆