title: Execute javascript only in specific url
body: <p>I have an external JS file with inside this code:</p>
  
  <pre><code>var mobile_number_param = document.getElementById('mobile_number_param');
  mobile_number_param.maxLength = 9;
  mobile_number_param.readOnly = true;
  var email = document.getElementById('email');
  email.readOnly = true;
  var user_notes = document.getElementById('user_notes');
  user_notes.maxLength = 90;
  var admin_notes = document.getElementById('admin_notes');
  admin_notes.maxLength = 90;
  </code></pre>
  
  <p>Now my goal is to apply the code related to "mobile_number_param" but ONLY when I'm on the "reserve.php" page otherwise I'm not allowed to modify my Mobile Phone number in other area such my profile page.</p>
  
  <p>Somebody told me this:</p>
  
  <hr>
  
  <p>You can recognize the current url by checking window.location.href and e.g. searching for reserve.php to know you're on the reservation page..then apply your code.</p>
  
  <hr>
  
  <p>Unfortunately I'm not a coder and don't have any idea how to do.</p>
  
  <p>Any suggestions ? Thank for your time...</p>