Submit form using javascript, work in FF but not in IE
- by Permana
I have this code.
The code below is working in Firefox, but it is not in IE
<body>
<?php
$data = getLoginData($_SESSION['whoyouare']);
?>
<form name="frm_redirect_dfr" action="<?php echo $data['url']; ?>" method="POST" id="frm_redirect_dfr" style="display: none;">
<input name="DFRNet_User" value="<?php echo $data['username']; ?>" type="hidden" />
<input name="DFRNet_Pass" value="<?php echo $data['password']; ?>" type="hidden" />
<input name="tbllogin" value="login" type="hidden" />
<input type="submit" value="submit" />
</form>
<script language="javascript" type="text/javascript">
document.forms["frm_redirect_dfr"].submit();
</script>
</body>
What I want to do is, when user access the page, it first will try to get login data, echo it in the form, and submit the form automatically using javascript