title: pass paramenter to document ready function from another page
body: <p>I have this code in a separate js-file to load content into a page without reloading the page:</p>
  
  <pre><code>$(document).ready(function(){
  
  //Catch the form's submit event:
  $('#skipreload').submit(function() {
      //Create AJAX call:
      $.ajax({
          //Get form data:
          data: $(this).serialize(),
          //GET or POST method:
          type: 'GET',
          //The file to call:
          url: 'webaddress.php',
          //On success update div with response:
          success: function(response) {
              $('#form_output').html(response);
          }
      });
      return false;
  });
  });
  </code></pre>
  
  <p>I call the function in a page like this:</p>
  
  <pre><code>&lt;html&gt;
  &lt;body&gt;
  &lt;head&gt;
  &lt;script src="js/script.js"&gt;
  &lt;!-- Want to create variable to pass parameter to document ready function here --&gt;
  &lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
  (...)
  </code></pre>
  
  <p>Now I want to pass the 'webaddress.php'-url as a parameter from the HTML-page to the script.js-file and its submit function, but I cannot make this work. Does someone know how this can be done?</p>