soumettre une form dans Iframe
Bonjour,
je souhaite soumettre une form dans une Iframe. Tout se passe bien si la fonction est declenchée par un bouton mais ouvre une PopUp si c'est automatique..... Pourquoi ?
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
|
<html>
<head><title></title>
<script type="text/javascript" language="javascript">
function submitForm() {
document.ResultForm.target = "theIFrame";
document.ResultForm.action = "/SearchEngine/Results.aspx";
document.ResultForm.submit();
}
</script>
</head>
<body>
<form method='post' action="/SearchEngine/Results.aspx" target="theIFrame" id="ResultForm" name="ResultForm" > ****
<input value="test" onclick="submitForm()" type="button" />
<script>submitForm()</script>
</form>
<iframe src='' frameborder="0" name="theIFrame" height="100%" width="100%" />
</body>
</html> |
Merci à vous