I would like to send data to a web page through javascript. The code below works, however only with chrome. For example Firefox the code does not work. Do you know another method to send data when loading page that works on all browsers?
<html>
<head>
</head>
<body>
<form name="FormType" method="post" action="/welcome.php">
<input type="hidden" name="var1" value="abc">
</form>
<script type="text/javascript">
function autoClick () {
document.forms["FormType"].submit();
}
window.onload = autoClick;
</script>
</body>
</html>