<!DOCTYPE html>
<html>
<head>
<script>
function formSubmit()
{
document.getElementById("frm1").submit();
}
</script>
</head>
<body>

<p>Enter some text in the fields below, then press the "Submit form" button to submit the form.</p>

<form action = "">
Auth: <select name = "Auth">
<option value = "Server1">Server-1</option>
<option value = "Server2">Server-2</option>
<option value = "Server3">Server-3</option>
<option value = "Server4">Server-4</option>
</select>
</form>

<form id="frm1" Method="GET" action="logs.html">
Log Number:<input type="text" name="fname"><br>
<input type="button" onclick="formSubmit()" value="Submit">
</form>

</body>
</html>    

Need some help guys...please help me out with this, actually m new to JS.

Ok, first, you got to give it more than one minute between the time you first ask for help and then ask again.

When submitting a form, you do not actually need to incorporate JavaScript, at least not in this example. Secondly, are you using more than just HTML? Server-side scripting such as ASP, PHP, ASP.NET? You need to be able to retrieve the input values on the page that you send the data to (you specify that in the action attribute for the form element).

Next, you have two forms in your example. You should have one form for this example. Your select, option, and input elements will be placed within the form element.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.