Hide Next button and auto submit page after a period of time

Hi. I am using some javascript to hide the Next button then automatically submit the page after a flash file (TV ad) has loaded and played. It works well in IE and FireFox but not in Chrome or Safari. In Chrome & Safari the count down to the page submit starts as soon as the page appears, instead of starting the count down after the page has fully loded (ie the flash file has loaded and started playing). This means the page is submitted before the embedded flash file has finished playing. The browsers seem to treat the "onload" event differently. Does anybody have a fix or suggestion for this? Here is the code I paste into the question HTML header...

<body onload="doonload()">
<script language="javascript">
function doonload()
{
document.getElementById('next_button').style.visibility = 'hidden';
setTimeout('SSI_SubmitMe()',31000); 
}
</script>



Thanks in advance.
Russell Pizel
asked 3 months ago by anonymous
I'd suggest a visit to stackoverflow.com and ask there
Russell,
Did you find a solution to get the Hidden-Next-Button-Autosubmit page java script to work in Chrome and Safari?
I need to the same, but with page with images.
Hi. I didn't find a nice solution to work for a page that takes a long time to load (eg loading a page containing 3MB Flash file)... but the above solution should work for you if you are only loading images... the load time for images between respondents should be fairly similar???

Cheers
Russell

Your answer (use only for answers to the question; otherwise use comments)

Email me at this address if my answer is selected or commented on:
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please log in or register.

0 Answers

Related questions