Jeg har nedenstående kode... og kan simpelthen ikke finde ud af hvorfor
knapperne ikke virker ... eksempel kan ses på
http://www.geekarea.dk/q-data/admin.php
.... det er blandet php og javascript (og html) så jeg har bare postet hele
koden
<?
include("dbconn.inc");
$query = "SELECT * FROM $tabel";
$result = mysql_query($query);
echo "<html><head><title>DYNAMISK Prisliste ver.
1.0</title></head><body>";
echo
"<table><tr><td>ID</td><td>DATO</td><td>Type</td><td>Specifikation</td><td>P
ris</td>";
?>
<script language=javascript>
<!--
function add()
{
document.Form1.action = "add.php"
document.Form1.submit();
return true;
}
function update()
{
document.Form1.action = "update.php"
document.Form1.submit();
return true;
}
function delete()
{
document.Form1.action = "delete.php"
document.Form1.submit();
return true;
}
-->
</script>
<?
while($row = mysql_fetch_array($result))
{
echo "<form name=\"Form1\" method=\"post\">
<tr><td><input type=\"text\" name=\"id\" value=\"".$row["id"]."\"
size=\"3\" maxlength=\"3\" readonly></td>
<td><input type=\"text\" name=\"dato\" value=\"".$row["dato"]."\"
size=\"7\" maxlength=\"6\" readonly></td>
<td><input type=\"text\" name=\"type\" value=\"".$row["type"]."\"
size=\"11\" maxlength=\"10\"></td>
<td><input type=\"text\" name=\"specifikation\"
value=\"".$row["specifikation"]."\" size=\"50\" maxlength=\"50\"></td>
<td><input type=\"text\" name=\"pris\" value=\"".$row["pris"]."\"
size=\"11\" maxlength=\"10\"></td>
<td><INPUT type=\"button\" value=\"update\" name=\"submit\"
onclick=\"return update();\">
<INPUT type=\"button\" value=\"delete\" name=\"submit\"
onclick=\"return delete();\">
</tr></form>";
}
?>
</table></body></html>