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

The Archive Base Latest Questions

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

I’m learning how to apply ajax to my jquery/php/mysql script for the purpose of

  • 0

I’m learning how to apply ajax to my jquery/php/mysql script for the purpose of callback firing. This question is probably from my ignorance when it come to the name of this term.

The Question: Is there a way to reset ajax callback without reloading the page script.

The Goal: I have a mysql query displaying on jQuery Accordian 1, 2, and 3. The goal is to click a query result href from Accordian and display the results in jQuery UI Tab 3 without a page reload…So far the script fires on my first callback but it doesn’t fire a second time. Is there a term or jquery command that will reset jquery/ajax?

index.php

<?php 
...script... include'right.content.php';
?> 

<script type="text/javascript" >
$(function() {
$("#submit").click(function(){   // when submitted 
  var name = $('#string2').val();
  var lname = $('#string3').val(); //  // POST name to php
  $('#stage').load('test.arena/test.php', {'string2':name, 'string3':lname,} ); 
});
$( "#tabs" ).tabs().find( ".ui-tabs-nav" ); 
$( "#accordion" ).accordion();
});
</script>

index.php – html section

   <div id="stage">
        <?php include'test.arena/test.php';?>
   </div>

right.content.php

while ($row = mysql_fetch_array($result)){      
  if($row['stats'] == "1"){
$data .= "<tr><td colspan='2'>".$row['order_number']."</td> 
<td colspan='2'>
<input type='hidden' id='string3' value='".$row['details']."'>
<input type='hidden' id='string2' value='".$row['order_number']."'>
<input type='button' id='submit' value='View'></td>
<td>info</td></tr>";

test.arena/test.php

if(!isset($_POST['string2'])){
$_POST['string2'] = "";

}else{

$string3 = "PO Number:" .$_POST['string3']; 
$string2 = "Order:" .$_POST['string2'];
echo $string3 ."</br>";
echo $string2 ."</br>";    
}
  • 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-25T10:44:50+00:00Added an answer on May 25, 2026 at 10:44 am

    The problem is probably because your submit button is inside of the ‘stage’ div. This means that when you load the new ‘stage’ content, it will delete the old button and add a new one and the new one won’t have any click thing attached.

    The quick fix for this is to use a ‘live’ handler.

    $(function() {
      $("#submit").live('click', function(){   // when submitted 
            var name = $('#string2').val();
            var lname = $('#string3').val(); //  // POST name to php
            $('#stage').load('test.arena/test.php', {'string2':name, 'string3':lname,} );
      });
    
      $( "#tabs" ).tabs().find( ".ui-tabs-nav" ); 
      $( "#accordion" ).accordion();
    });
    

    But the other solution, which might make the problem clearer, is to re-add the click handler after the load finishes.

    $(function() {
    
      function submitClicked() {
        var name = $('#string2').val();
        var lname = $('#string3').val(); //  // POST name to php
        $('#stage').load(
          'test.arena/test.php', 
          { 'string2':name, 'string3':lname },
          function() {
            addClickHandler();
          }
        ); // display results from test.php into #stage 
      }
    
      function addClickHandler() {
        $('#submit').click(submitClicked);
      }
    
      addClickHandler();
      $( "#tabs" ).tabs().find( ".ui-tabs-nav" ); 
      $( "#accordion" ).accordion();
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
For some reason, after submitting a string like this Jack’s Spindle from a text
this is what i have right now Drawing an RSS feed into the php,
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
Does anyone know how can I replace this 2 symbol below from the string
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want to count how many characters a certain string has in PHP, but
I would like to count the length of a string with PHP. The string
I have a jquery bug and I've been looking for hours now, I can't
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and

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.