I have tried this code for sending some information to a specific IP. That IP is a microcntroller that acts as a server.
However it sends the information to a page named with that IP not to that IP.
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:
<!DOCTYPE html>
<html>
<head>
<script>
function validateForm()
{
var x=document.forms["myForm"]["fname"].value;
if (x==null || x=="")
{
alert("First name must be filled out");
return false;
}
}
</script>
</head>
<body>
<form name="myForm" action="192.168.1.250" onsubmit="return validateForm()" method="post">
First name: <input type="text" name="fname">
<input type="submit" value="Submit">
</form>
</body>
</html>