IndianaGuy Posted November 21, 2017 Share Posted November 21, 2017 (edited) I have a very simple code that often only works after I get to the page, then ask for the page to reload. If I click the button without reloading, nothing happens. If I click after page refresh, it works perfect. Thank you for your help. This page has a few tables all brought in by PHP select statements etc. Could that possible have some anything to do with it? <script> $(document).ready(function(){ //OPENING PRIMARY $('.OpenerPri').on ('touchstart click',function() { var ppNum = ($(this).val()); var callType = 'opener_pri'; ($(this).prop('disabled', true)); ($(this).html('Thx')); $.post("reservecall.php", { ppnum:ppNum, calltype:callType }, function(data, status){ alert("Data: " + data + "\nStatus: " + status); }); }); }); </script> Edited November 21, 2017 by IndianaGuy Link to comment Share on other sites More sharing options...
justsomeguy Posted November 22, 2017 Share Posted November 22, 2017 There's not really enough context to suggest what the problem is, but the first step is to make sure you're finding Javascript error messages if there are any. Link to comment Share on other sites More sharing options...
IndianaGuy Posted November 22, 2017 Author Share Posted November 22, 2017 The developer tools in Chrome is not showing that there are nay errors! Any other place I can go that may identified errors? Thank you Link to comment Share on other sites More sharing options...
justsomeguy Posted November 22, 2017 Share Posted November 22, 2017 Any Javascript errors will be on the console. You can also add some console.log statements in that code to have it print out what it's doing and verify. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now