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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T22:56:33+00:00 2026-06-10T22:56:33+00:00

The problem I am having is that my jquery script is not returning the

  • 0

The problem I am having is that my jquery script is not returning the success to the div and instead simply reloading the page (which should not be possible with the prevent). My code is below. Any help would be awesome as I’ve spent quite a bit of time trying to get this to work.

$(document).ready(function() {
var loader = "<img src='images/ajax-loader.gif' alt='loading...' />";
    $('#paging_container').pajinate({
    show_first_last: false,
    nav_label_next : '>',
    nav_label_prev : '<'    
    });

var loadUrl2 = "productadminprocess.php";
$(".action_buttons").click(function() {
    $("#rightcolumn").html(loader).load(loadUrl2, {productid: $(this).attr("id")});
  });


$("#thesubbie").submit(function(event) {

        /* stop form from submitting normally */
        event.preventDefault(); 

       /* get some values from elements on the page: */
        var loadUrl3 = "sortitems.php";
        var $form = $( this ),
            input = $form.find( 'input[name="sort_item"]' ).val();
        var myRadio = $('input[name=sorters]');
        var checkedValue =  myRadio.filter(':checked').val();

    $.post(loadUrl3, {radio: checkedValue, sort_item: input},
        function(data){
            var content = $(data);
            $('#thebox').html(content);

    });
  });

});

Here is the PHP Script that is returning data (a sort essentially)

function secure($x) { 


  $x = mysql_real_escape_string($x);
   $x = stripslashes($x);
   return $x; 

} 

$sorters = secure($_GET['sorters']);
$sort_item = secure($_GET['sort_item']);

//Start main query
$products = "SELECT * FROM product_list WHERE name_family = '$sort_item'";
//echo $products;
$list = mysql_query($products);
//echo $list;

while($row = mysql_fetch_array($list))  {
    $id = $row['id'];
    $name = $row['product_name'];
?>

    <div class="products"><img src="images/Product_thumbail.png" width="200" height="220" title="<?php echo $name; ?>" alt="<?php echo $name; ?>"><div class="action_buttons" id="<?php echo $id;  ?>">Update</div></div>
<?php       
    } // end while

?>
  • 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-10T22:56:34+00:00Added an answer on June 10, 2026 at 10:56 pm

    Try this in the $.post block:

    $.post(
        loadUrl3,
        { radio: checkedValue, sort_item: input },
        function(data) {
            $('#thebox').html(data);
        }
    );
    

    Also, check your JS Error Log for any errors.

    EDIT: Try adding return false; at the end of the $(“#thesubbie”).submit() block.

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

Sidebar

Related Questions

I'm having an issue with jQuery UI Tabs script which does not pick up
I using jQuery-UI sortable which works fine. The problem that I am having is
I'm having a problem with a jQuery form that I'm working on at the
the Problem I am having is that the PostExecute is not firing. I see
Problem Scripts on some pages that use jquery are not activating. Scenario Finding that
I am having a page that loads content dynamically. Depending on which menu item
Having problem with jquery submit(). The problem is that it doesn't work on the
My PHP script is having a problem decoding the JSON that I'm sending to
I have made a jQuery/javascript that is loading a page into a div when
I am having problem that when i am trying to submit the form by

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.