title: Change script data-location for a <script> inside HTML
body: <p>I would like to modify one tag using javascript. I have a textbox to introduce a postcode and a button to find car parks near the position. The HTML tag is the following:</p>
  
  <pre><code>&lt;script src="http://en.parkopedia.co.uk/js/embeds/mapView.js" data-Location="http://en.parkopedia.co.uk/parking/ST84JF/" data-options="l=0&amp;tc=0&amp;zc=1&amp;country=UK&amp;ts[]=4&amp;ts[]=3&amp;ts[]=2" data-size="750:400" type="text/javascript"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>I have two questions:</p>
  
  <ol>
  <li>Can I modify the data-location to add the text write inside the textbox to search in that location?</li>
  <li>Can I activate the script only when the button is clicked using javascript or jquery? The main problem here is that the  should be inside the HTML code and I don't know how to put it inside the javascript file.</li>
  </ol>
  
  <p>Code updated:</p>
  
  <pre><code>function find(){
      $("script[id=script_map]").remove()
      var search = document.getElementById('box_txt').value ;
      $("&lt;script /&gt;", {
          "src":"http://en.parkopedia.co.uk/js/embeds/mapView.js",
          "data-location":"http://en.parkopedia.co.uk/parking/" + search,
          "data-options":"l=0&amp;tc=0&amp;zc=1&amp;country=UK&amp;ts[]=4&amp;ts[]=3&amp;ts[]=2",
          "data-size":"750:400",
          "id":"script_map",
          "type":"text/javascript"
      }).appendTo("#divId")
  }
  </code></pre>