I created a input field and using onpaste function to trigger the form submit. But it only submits the data currently in the input field if any not the pasted in data.
I need to send the pasted in data. Any suggestions what I did wrong?
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
</head>
<body>
<form action="textDataSubmittedGet/" method="get" id="MyForm">
Your Data: <input type="text" onpaste="myFunction()" name="textData"><br>
</form>
<script>
function myFunction() {
$("#MyForm").trigger('submit');
}
</script>
</body>
</html>