为什么这个Facebook应用程序无休止地刷新

时间:2012-07-03 22:13:38

标签: php

我恳请您帮助我在代码中找出原因,为什么我的应用程序会不断刷新。这不允许我导航到其他页面,我是PHP的学习者,我怀疑这可能是问题,帮助。这可能是php安排的问题吗?

这是index.php

中的代码
            <script type="text/javascript">
$(document).ready(function() {
    $('#premium_b').click(function(e) {
        e.preventDefault();
        $('#tabs').tabs( "select" , 4 );
    });
    $('#tabs').bind('tabsselect', function(event, ui) {
        if (ui.index == 4 )
            $('#premium_b').css ('display', 'none');
        else
            $('#premium_b').css ('display', 'block');
    }); 
});
</script>
<div id="bloc_134" class="li_bloc"><ul class="menu"><li><a href="http://apps.facebook.com/mtkenya-dev/index.php?p=contact_form_homepage&amp;tab=contact_form_homepage&amp;page_id=" title="contact_form_homepage" class="fbtab">Home</a>
            </li>
            <li><a href="https://apps.facebook.com/mtkenya-dev/index.php?p=contact_form_config&amp;tab=contact_form_config&amp;page_id=" title="contact_form_config" class="fbtab">Config</a>
            </li>
            <li><a href="https://apps.facebook.com/mtkenya-dev/index.php?p=contact_form_export&amp;tab=customize_css&amp;page_id=" title="contact_form_css" class="fbtab">Customize</a>
            </li>
            <li><a href="https://apps.facebook.com/mtkenya-dev/index.php?p=contact_form_export&amp;tab=contact_form_export&amp;page_id=" title="contact_form_export" class="fbtab">Export</a>
            </li>
            <li><a href="https://apps.facebook.com/mtkenya-dev/index.php?p=contact_form_premium&amp;tab=premium&amp;page_id=" title="contact_form_premium" class="fbtab">Premium</a>
            </li>
            <li><a href="https://apps.facebook.com/mtkenya-dev/index.php?p=contact_form_stats&amp;tab=contact_form_stats&amp;page_id=" title="contact_form_stats" class="fbtab">Statistics</a>
            </li>
            <li><a href="https://apps.facebook.com/mtkenya-dev/index.php?p=contact_form_doc&amp;tab=doc&amp;page_id=" title="contact_form_doc" class="fbtab">Doc</a>
            </li>
            <li><a href="https://apps.facebook.com/mtkenya-dev/index.php?p=contact_form_about&amp;tab=contact_form_about&amp;page_id=" title="contact_form_about" class="fbtab">About</a>
            </li>
            <li><a href="https://apps.facebook.com/mtkenya-dev/index.php?p=contact_form_other_app&amp;tab=contact_form_other_app&amp;page_id=" title="contact_form_other_app" class="fbtab">Other Apps</a>
            </li>
            <li><a href="https://apps.facebook.com/mtkenya-dev/index.php?p=contact_form_faq&amp;tab=contact_form_faq&amp;page_id=" title="contact_form_faq" class="fbtab">FAQ</a>
            </li>
            </ul>
            <a href="https://apps.facebook.com/mtkenya-dev/index.php?p=contact_form_premium&amp;tab=premium&amp;page_id=" title="Upgrade to Premium to get white branding and help us improve your favourite apps! : Click her" id="premium_b">Upgrade to Premium to get white branding and help us improve your favourite apps! : Click her</a>
            <div class="clear"></div>
            </div>
                </div>
    <div id="alerts">
            </div>
    <div id="zone2" class="li_zone li_x1 li_y2">

<div id="contact_form_about"><div class="zone2"> 
            </div></div>


<div id="contact_form_config"><div class="zone2"><script type="text/javascript">
function refreshApp (url) {
    $.get(url, function(data) {
      $('*').html(data);
    });
}
$(document).ready(function() {
var options = { 
success: showResponse,
beforeSubmit: disableButton
}; 
$('#tab_info_form_0').ajaxForm(options);
});

function addToPage() {
var obj = {
  method: 'pagetab',
  redirect_uri: 'https://apps.facebook.com/mtkenya-dev/?page_id=#contact_form_config',
};

FB.ui(obj);
}
</script>
<script>top.location.href='https://www.facebook.com/dialog/oauth?client_id=461688580525581&redirect_uri=https%3A%2F%2Fapps.facebook.com%2Fmtkenya-dev%2F%3Ftab%3Dcontact_form_config&scope=email,manage_pages'</script></div>
            <div class="zone2"><script type="text/javascript">
$(document).ready(function() {
var options = { 
success: showResponse,
beforeSubmit: disableButton
}; 
$('#contact_form').ajaxForm(options);
$('#customize_css').ajaxForm(options);
});
</script>
<div id="bloc_133" class="li_bloc"><p>Page non trouv?e</p>
            </div>
            </div>
            </div>


<div id="contact_form_css"><div class="zone2"><script type="text/javascript">
function refreshApp (url) {
    $.get(url, function(data) {
      $('*').html(data);
    });
}
$(document).ready(function() {
var options = { 
success: showResponse,
beforeSubmit: disableButton
}; 
$('#tab_info_form_0').ajaxForm(options);
});

function addToPage() {
var obj = {
  method: 'pagetab',
  redirect_uri: 'https://apps.facebook.com/mtkenya-dev/?page_id=#contact_form_css',
};

FB.ui(obj);
}
</script>
<script>top.location.href='https://www.facebook.com/dialog/oauth?client_id=461688580525581&redirect_uri=https%3A%2F%2Fapps.facebook.com%2Fmtkenya-dev%2F%3Ftab%3Dcontact_form_css&scope=email,manage_pages'</script></div>

            </div>

            <div id="contact_form_doc"><div class="zone2"><script type="text/javascript">
$(function() {
    $("#bloc_223").tabs({
        ajaxOptions: {
            error: function( xhr, status, index, anchor ) {
                $( anchor.hash ).html(  "Couldn't load this tab. We'll try to fix this as soon as possible. ");
            }
        },
        cache: true
    });
});

</script>

            </div>
            </div>


<div id="contact_form_export"><div class="zone2"><script type="text/javascript">
function refreshApp (url) {
    $.get(url, function(data) {
      $('*').html(data);
    });
}
$(document).ready(function() {
var options = { 
success: showResponse,
beforeSubmit: disableButton
}; 
$('#tab_info_form_0').ajaxForm(options);
});

function addToPage() {
var obj = {
  method: 'pagetab',
  redirect_uri: 'https://apps.facebook.com/mtkenya-dev/?page_id=#contact_form_export',
};

FB.ui(obj);
}
</script>
<script>top.location.href='https://www.facebook.com/dialog/oauth?client_id=461688580525581&redirect_uri=https%3A%2F%2Fapps.facebook.com%2Fmtkenya-dev%2F%3Ftab%3Dcontact_form_export&scope=email,manage_pages'</script></div>


    <div id="footer" class="li_zone li_x1 li_y4">&nbsp;</div>
</div>

    </body>


</html>

1 个答案:

答案 0 :(得分:0)

好吧,我看了3次:

top.location.href=....

没有任何条件,也没有在函数调用中。这肯定会使你的页面跳跃。