So, I've got this <input> that I want to be able to enter stuff in, but not submit, because I already have a button that will be submitting it to a form handler.
<form name="form">
<input id="JSinp" type="email" name="Com" method="post"
autocomplete="off" required autofocus>
</form>
<button onclick="exec()" id="evalbutton">Submit</button>
<script>
function exec() {
var Com = document.forms["form"] ["Com"].value;
eval(Com);
}
The id's are solely for styling purposes. Currently, when I press enter on the <input> it shows up in the URL and goes through the whole posting refresh and whatever. That's another thing. When using method="post" isn't it not supposed to show up in the URL bar? This might just be a bug in my browser but any help would be appreciated.
UPDATE:
I just replaced the button with this:
<input type="submit" onclick="exec()" id="evalbutton" value="Submit">
and that works.
But any help with the method="post" would be a big help.