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 7776957
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T18:00:47+00:00 2026-06-01T18:00:47+00:00

I am working on my simple test page that was full of forms. As

  • 0

I am working on my simple test page that was full of forms. As one of you posted few days ago I am now using jquery to use ajax and avoid to refresh the page once one of the submit button are pressed. So just following the template I’ve found here: http://jquery.malsup.com/form/

I’ve added to my webpage this piece of code:

<script> 
    $(document).ready(function() { 
        // bind 'myForm' and provide a simple callback function 
        $('#myForm').ajaxForm(function() { 
            alert("Thank you for your comment!"); 
        }); 
    }); 
</script> 

What I experience is that now the forms work perfectly but the ajax setTimeout function does not work anymore! If I remove the previous code the ajax setTimeout is working again. Have you guys a clue on why it does like that?

<script type="text/javascript">

    function myff(abc)
    {

        var
            $http,
            $self = arguments.callee;

        if (window.XMLHttpRequest) {
            $http = new XMLHttpRequest();
        } else if (window.ActiveXObject) {
            try {
                $http = new ActiveXObject('Msxml2.XMLHTTP');
            } catch(e) {
                $http = new ActiveXObject('Microsoft.XMLHTTP');
            }
        }

        if ($http) {
            $http.onreadystatechange = function()
            {
                if (/4|^complete$/.test($http.readyState)) {
                    document.getElementById('ReloadThis3').innerHTML = $http.responseText;
                    setTimeout(function(){$self(abc);}, 1000);
                }
            };
            $http.open('GET', 'loadfunc.php' + '?abc=' + abc);
            $http.send(null);
        }
    }

</script>

new code:

<script>   
        $(document).ready(function() {


        $('#s1hvform1').ajaxForm(function() {
        });

      sendreq(abc);
});

function sendreq(abc)
{
    $.get('loadfu.php?abc='+abc,function(r)
    {          
        $('#ReloadThis2').html(r);
        setTimeout(function(){sendreq(abc);},1000);        });
}           

</script>


<div id="ReloadThis2">Loading data...</div>
  • 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-06-01T18:00:49+00:00Added an answer on June 1, 2026 at 6:00 pm

    setTimeout() is not an ajax function, and it has to be passed a function handle in the form of a string I am fairly certain. Also, why are you not using jquery for this, seeing as you are in the first code block?

    function sendRequest(abc)
    {
        $.get('loadfunc.php?abc='+abc,function(r)
        {
            $('#ReloadThis3').html(r);
            setTimeout(function(){sendRequest(abc);},1000);
        });
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a very simple test page that uses XHR requests with jQuery's $.getJSON
Im working on a HTML test page with a simple grid that has red
I've been working on a small page in PHP, one that doesn't need the
I wrote a simple test program for opencv to see if it's working after
Working on a simple C program I'm stuck with an if test: int line_number
Good Day, I have a simple working routine in Perl that swaps two words:
I've got, what I would consider, a simple test web site. A single page
I'm working on a project that's trying to implement some editing features using a
I have been working on a jquery plugin that uses a HTML5 audio player
I am using Navigation framework and basicly got one frame that is used for

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.