The below code is working only on Firefox, and not working on IE or Chrome.
<form action="advertise2.php" method="get" id="daforma">
<input type="submit" name="submit" value="" />
</form>
<script type="text/javascript">
var evt = document.createEvent('Event');
evt.initEvent('submit', true, true);
document.getElementById('daforma').dispatchEvent(evt);
</script>
Any suggestions?
If you are just trying to submit the form as soon as the page loads you could use something like this.