title: How do you write or replace a url in a function using onClick?
body: <p>I'm new to javascript and I'm having a particularly difficult time figuring out how write new urls into an existing function using onClick.</p>
  
  <p>Here is some more info:</p>
  
  <p>I want to have something like this</p>
  
  <pre><code>   &lt;script type="text/javascript"&gt;
  
      function addurl(){
      "server": [
                   {
                      "position": "center",
                      "url": "New_Url"
                   }
                ]
                       }
      &lt;/script&gt;
  
      &lt;div id="urlbutton"&gt;&lt;/div&gt;
      &lt;input type="button" onclick="????" value="url123"&gt;
  </code></pre>
  
  <p>Basically I want to replace the "url" when clicking different buttons/links. I've spent hours and hours today trying to figure this out and now I'm basically all turned around not knowing what to do.</p>
  
  <p>Any type of help will be greatly appreciated!</p>