neomaxin
06-06-2003, 05:12 AM
Im having trouble with my quantity list box in my cart!!! When another quantity is selected nothing happens and the database doesnt get updated!!!
Plus the status bar on browser says that there is an error on the page when a new quantity is selected!!!
Its a object expected error!!!
The code is as follows:
<script language="php">
// this creates the quantity select box for the item.
$itemname = $row["itemId"];
$totalOption = $row["itemoptions"];
printf("<select name=\"$itemname\" onChange=\"UpdateQty(this, '$totalOption')\">");
for($i = 1; $i <= 5; $i++)
{
echo "<option ";
if($row["qty"] == $i)
{
echo " SELECTED>" . $i . "</option>";
} else {
echo ">" . $i . "</option>";
}
}
// and the delete link
echo "</select><br><br><a href=\"cart.php?action=remove_item&itemId=$itemname&itemoptions=$totalOption\">";
echo "<font color=\"red\" size=\"1\"><b>Remove</b></font></a>";
</script>
Thanks for any help you can give me
Plus the status bar on browser says that there is an error on the page when a new quantity is selected!!!
Its a object expected error!!!
The code is as follows:
<script language="php">
// this creates the quantity select box for the item.
$itemname = $row["itemId"];
$totalOption = $row["itemoptions"];
printf("<select name=\"$itemname\" onChange=\"UpdateQty(this, '$totalOption')\">");
for($i = 1; $i <= 5; $i++)
{
echo "<option ";
if($row["qty"] == $i)
{
echo " SELECTED>" . $i . "</option>";
} else {
echo ">" . $i . "</option>";
}
}
// and the delete link
echo "</select><br><br><a href=\"cart.php?action=remove_item&itemId=$itemname&itemoptions=$totalOption\">";
echo "<font color=\"red\" size=\"1\"><b>Remove</b></font></a>";
</script>
Thanks for any help you can give me