Forum Moderators: open
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html>
<head>
<script>
<!--
function alertFunction(pid) {
var myname="let";
var xyz = pid;
var x=window.confirm("Möchten Sie den Eintrag löschen?");
if (x) {
window.document.getElementById('id_tst').setAttribute('value',xyz);
window.document.getElementById('test').submit();
}
}
//-->
</script>
<title>Untitled</title>
</head>
<body>
<?php
if ($_POST['let']) {
echo $_POST['let'];
}
?>
<form id="test" action="test.php" method="POST">
<input type="hidden" name="let" id="id_tst" value"">
<?php
for ($i=1;$i<5;$i++) {
echo '<a href="javascript:;" onClick="alertFunction('.$i.');">Eintrag löschen</a><br>';
}
?>
</form>
</body>
</html>
In FF/opera it works and php echos the POST variable. In IE6 , I get the confirmation window, but the form is not proccessed.
Any ideas?
Thanks in advance
babil