Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7656339
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T12:44:25+00:00 2026-05-31T12:44:25+00:00

var refreshId = setInterval(function() { $(‘#livelist’).load(‘/scripts/livelist.php’, { guestlist:'<?php echo $_GET[‘guestlist’]; ?>’}); }, 5000); $.ajaxSetup({

  • 0
var refreshId = setInterval(function() {
    $('#livelist').load('/scripts/livelist.php', { guestlist:'<?php echo $_GET['guestlist']; ?>'});
}, 5000);
$.ajaxSetup({ cache: false });

I know I need to attach the .live() event handler to prevent the function from triggering other events (what’s currently happening), but where do I add it?

Full Script:

$(document).ready(function() {

$("input#name").select().focus();

$('#livelist').load('/scripts/livelist.php', { guestlist:'<?php echo $_GET['guestlist']; ?>'});

var refreshId = setInterval(function() {
    $('#livelist').load('/scripts/livelist.php', { guestlist:'<?php echo $_GET['guestlist']; ?>'});
}, 5000);
$.ajaxSetup({ cache: false });

$("input#name").swearFilter({words:'bob, dan', mask:"!", sensor:"normal"}); 

var tagCheckRE = new RegExp("(\\w+)(\\s+)(\\w+)");

jQuery.validator.addMethod("tagcheck", function(value, element) { 
    return tagCheckRE.test(value);
}, "");

$("#addname").validate({
    invalidHandler: function(form, validator) { 
      var errors = validator.numberOfInvalids();
      if (errors) {
        $('#naughty').fadeIn('fast');
        $('#naughty').delay('1000').fadeOut('fast');
      } else {
        $('#naughty').hide();
      }
    }
});

$('#showall').live('click', function() {
    $('#showall').hide();
    $('div#shownames').slideDown('fast');
});

jQuery(document).ajaxStart(function(){
    $("input#name").blur();
    $('#working').show();
    $('#event-box').fadeTo('fast', 0.5);
})

var names = '';
var dot = '.';

$('#addname').ajaxForm(function() {

    var options = {

            success: function(html) {
                    /* $("#showdata").replaceWith($('#showdata', $(html))) */
                    var value = $("input#name").val().toUpperCase();;
                     $("span.success").text(value);
                     if (names == '') {
                        names = value;
                     }
                     else {
                        names = ' ' + value + ', ' + names;
                        $("span#dot").text(dot);
                     }
                     $("span#name1").text(names);
                    $('#working').fadeOut('fast');
                    $('#success').fadeIn('fast');
                    $('#added-names').fadeIn('fast');
                    $('#success').delay('600').fadeOut('fast');
                    $("input#name").delay('1200').select().focus();
                    $('#event-box').delay('600').fadeTo('fast', 1.0);
                    $(':input','#addname')
                        .not(':button, :submit, :reset, :hidden')
                        .val('')
            },
            cache: true,
            error: function(x, t, m) {
                if(t==="timeout") {
                    $('#working').fadeOut('fast');
                    $('#fail').fadeIn('fast');
                    $('#fail').delay('600').fadeOut('fast');
                } else {
                    $('#working').fadeOut('fast');
                    $('#fail').fadeIn('fast');
                    $('#fail').delay('600').fadeOut('fast');
                    alert(t);
                }
            }
    }

    $(this).ajaxSubmit(options);
    $('body').select().focus();
}); 

   $("input").bind("keydown", function(event) {
      var keycode = (event.keyCode ? event.keyCode : (event.which ? event.which : event.charCode));
      if (keycode == 13) {
             document.getElementById('#submit').click();
             return false;
      } else  {
         return true;
      }
   });

});

The ajaxForm function is being triggered using my current implementation.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T12:44:26+00:00Added an answer on May 31, 2026 at 12:44 pm

    The fault:

    jQuery(document).ajaxStart(function(){
        $("input#name").blur();
        $('#working').show();
        $('#event-box').fadeTo('fast', 0.5);
    })
    

    As .ajaxStart() is a global parameter, it was being triggered during every AJAX call, including .load(), I’m surprised no one spotted it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using the simple jQuery DIV refresh code. var refreshId = setInterval(function() { $('#refreshdash').load('dashboard.php?cache=');
I have the following jquery code: $(.rotateNews).load(/load_news.php); var refreshId = setInterval(function() { $(.rotateNews).load('/load_news.php?newsID='); },
$(document).ready(function(){ var refreshId = setInterval(function() { periodicRefresh(); }, 9000); }) . function periodicRefresh() {
I have a jquery ex like this.. jQuery(document).ready(function() { var refreshId = setInterval(function() {
I have the following timer which periodically updates my page: var refreshId = setInterval(function()
I have a setInterval function var auto_refresh = setInterval(function () { if ($('#addNewJuicebox:visible')) {
I am using the .load() function like this: <script> $(document).ready(function() { $.ajaxSetup({ cache: false
I am using setInterval and the jQuery load function to periodically update an image
Here my code: $(document).ready(function() { $('#mid_select').live('click', function(e){ $('#middle').load( $(this).attr('href') + ' #middle'); var page
I have the following code which retrieves the variable hf using getJSON $.getJSON('../scripts/json.php', function(json)

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.