Can anyone tell me why this Javascript isn't working? (The following is the PHP code:)
if ($quantity>$inventory) {
echo '<script language="javascript">
var i = confirm("There are ';
echo number_format($inventory);
echo ' copies in inventory in ';
echo $warehouse_name;
echo '.nnThis order is for ';
echo number_format($quantity);
echo ' copies.nnThat is ';
echo number_format($difference);
echo ' more than are available.nnClick OK to create a backorder for this itemnor Cancel to abort.");
if (!i) window.close();';
echo '</script>';
}
The idea is simple