AutoSubmit form recurring?
Posted: Wed Apr 09, 2008 9:36 pm
Hi By adding the Javascript function below I've managed to get a form which is a part of a large pre-written application to submit automatically when loading page but it seems to just repeat this every second going into some kind of loop. Any ideas how this might be caused/cured would be much appreciated
(The form is for payment choices with one option already checked, being all that seems neccessary when manually submitting the form)
(The form is for payment choices with one option already checked, being all that seems neccessary when manually submitting the form)
Code: Select all
<?php
<form name=\"transa\" action=\"";
if($this->db->get_site_setting
('use_ssl_in_sell_process'))
{
$this->body .= $this->db->get_site_setting ('classifieds_ssl_url');
}
else
{
$this->body .= $this->db-
>get_site_setting('classifieds_file_name');
}
$this-
>body .="?a=1&b=billing_accepted&set_trans_details=1\" method=\"post\">
<script language=\"Javascript\">
function submitForm()
{
document.transa.submit();
}
</script>
<body onLoad=\"submitForm();\">
</body>
?>