javascript sending data into a url
<p>I  have tried this code for sending some information to a specific IP. That IP is a microcntroller that acts as a server.</p>

<p>However it sends the information to a page named with that IP not to that IP.</p>

<p>The code is written in JavaScript. What I should to do? Use post method or Xmlhttprequest and how to do that. I think my code is very simple:</p>

<pre><code>&lt;!DOCTYPE html&gt;
&lt;html&gt;
&lt;head&gt;
&lt;script&gt;
function validateForm()
{
var x=document.forms["myForm"]["fname"].value;
if (x==null || x=="")
  {
  alert("First name must be filled out");
  return false;
  }
}
&lt;/script&gt;
&lt;/head&gt;

&lt;body&gt;
&lt;form name="myForm" action="192.168.1.250" onsubmit="return validateForm()" method="post"&gt;
First name: &lt;input type="text" name="fname"&gt;
&lt;input type="submit" value="Submit"&gt;
&lt;/form&gt;
&lt;/body&gt;

&lt;/html&gt;
</code></pre>
