php - JavaScript does not work when on my local MAMP server -
i uploaded site mamp server find that javascript failed work. when viewed file on computer scripts work fine. however, project saved php file on server, javascript no longer works. code below works fine on computer, not on server.
<script type="text/javascript" src= "http://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script> below linked website files via public dropbox folder. javascript being called bottom of index.php file (above body tag), , js folder contains file bootstrap.js, file having trouble calling.
<p>some html</p> <? \stripe\stripe::setapikey("#"); $token = $_post['#']; try { $charge = \stripe\charge::create(array( "amount" => 2000, // amount in cents, again "currency" => "usd", "source" => $token, "description" => "example charge") ); } catch(\stripe\error\card $e) { } ?>
without knowing error (among others), simplest fix possible , looks file path bootstrap.js may incorrect (as humble.rumble mentioned). try pull following bootstrap.js file cdn:
<!-- latest compiled , minified javascript --> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"> </script> alternatively, file bootstrap references bootstrap.js domain root:
<script type="text/javascript" src= "/js/bootstrap.js"></script> remove slash "**/**js/bootstrap.js" , reference bootstrap relative index.php:
<script type="text/javascript" src= "js/bootstrap.js"></script>
Comments
Post a Comment