title: how to preserve the effect of onsubmit
body: <p>I want to show the base map when the page loaded. So I added the base map as follows:</p>
  
  <pre><code>&lt;body onload="init()"&gt;
  </code></pre>
  
  <p>init() has the logic to display the base map.</p>
  
  <p>After clicking on submit button in the page, I want to impose a layer on that map. That logic I have written in a function called onSubmit:</p>
  
  <pre><code>&lt;form onsubmit="onSubmit()"&gt;
  </code></pre>
  
  <p>But what is happening that after submitting the form, page is again loaded and init() is called again and as a result I am getting the base map again :(</p>
  
  <p>please suggest.</p>