I have main file index.php and from index i am going to another file categories.php
Here is a div in categories.php
<div  id="allRings" class="categories">
          <img style="margin-top: 10px;" src="images/allrings~iPad.png" alt="" width="100" height="68" /><br /><br />
          <label class="catText" >All Rings</label>
    </div>
In jquery i am doing this
 jQuery('#allRings').click(function()
   {
       $.ajax({
                type: "POST",
        url: "getrings.php?ringType=all", // what ever exact url is
        data: "",
        success: function(result) 
                {
                  //alert(result);
                   // CALL index.php here with result data
                }
     });
   });
In getRings.php i have function
if(!empty( $_REQUEST['ringType'] )) 
{
    $db = new db();
    $ringType = $_REQUEST['ringType'];
    if ($ringType == "all")
       $rings   = $db->query("SELECT * FROM rings");
    else
       $rings   = $db->query("SELECT * FROM rings WHERE ringSetCategories LIKE '".$ringType."'");
    $response = array();
    $response['error'] = '';
    $response['status'] = '10';    
    $response['data'] = $rings;
    //echo json_encode( $response);
    header('location: http://www.xxx.com');
    exit;
}
Now problem i am facing is, the jquery code runs , however i am not sure if getRings code is being called or not because i am not headed towards any url when i click on div.Also if i have to pass $response to the $URL How would i do it
What could be wrong>?
 
     
     
    