With the code below, I can get the web page to automatically submit the form properly. I'm trying to figure out how to have the script delay for 5 seconds, then close the window without asking the user if they want the window to close.
This page will be used inside our company to launch a product provided by a vendor. Because it will be inside our network, the window will most likely be IE for anyone who uses it.
I cannot get the script to close the window after 5 seconds. I am trying to accomplish this without using jQuery. This is what I have so far.
<html>
<body>
<br/>
<h3>Launching GE Web Viewer ... Please Wait</h3>
<br/>
<form id="frmLaunchViewer" method="POST" action="https://geview.abc.org/startwebviewer.jnlp">
<input type="hidden" name="user" value="MyUserName">
<input type="hidden" name="password" value="MyPassword">
<script>
document.getElementById('frmLaunchViewer').submit();
window.setTimeout(CloseMe, 500);
</script>
<script>
function CloseMe()
{
window.close();
}
</script>
</form>
</body>