Taking 3 clicks to exit the Alert popup, not sure why?


I’m not sure why but it takes 3 clicks to close the alert popup, any ideas as to why?

$(document).ready(function() {      
           var prjid = $('#Sel_number').val();           
           alert("button submit==>: " + prjid );

thank you.

Can you set up a demo on codepen or have a webpage handy? At least the relevant HTML.

I tried on code pen but its not doing the same thing.

I was hoping to simply the issue with the first post but now that i see there wasn’t enough information to really evaluate the problem.
The script does work as per design, but its also looping through the PHP file 3 to 4 times to access the database and not sure why. like i stated earlier, i have to click the alert button 3 to 4 times to get through the script.

What this script :

  1. user selects something from the dropdwon menu
  2. based on the dropdown menu, AJAX script takes over and runs a PHP file to pull in records to display.

I noticed through the developers tool->network tab the Ajax script is hitting the PHP file 3 to 4 times like its in a loop of some sort.

$(document).ready(function() {      
         // event.preventDefault(); 
           var prjid = $('#idSel_project').val();    
           alert("stage 1=>:"+ prjid)     ;
                    type: "POST", 
                     url: 'system/get_subVersionList.php',                  
                     data: ({project: prjid}),                       
                 success: function(response){ 
                    alert("stage 2=>:"+ response);
                  },//end of success function
                  error: function() { 
                        // alert("stage3");                                            
                    }// end of error function
               });//end of ajax statement and begining of type: post          
          return false;
     }); //End of change function
     return false;
}); // End of ready function - Wait till page is loaded

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.