- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
echo "<script type='text/javascript'>
function checksubmit ( form )
{ ";
echo "if (acton) {";
$get_count_parts="SELECT PartID, ProdDesc FROM Pr2 WHERE ProdID='".$_SESSION["ProdID"]."' AND FOblig='*'";
$get_count_parts1=mysql_query($get_count_parts);
while ($pr=mysql_fetch_assoc($get_count_parts1))
{
echo"var zart".$pr['PartID']."=document.getElementsByName('21_".$pr['PartID']."')[0].value;
var name".$pr['PartID']."=document.getElementsByName('14_".$pr['PartID']."')[0].value;";
}
echo "var curr=document.getElementsByName('20_1')[0].value;
if (curr=='') { alert('Currency was not specified'); return false;}";
$get_count_parts2=mysql_query($get_count_parts);
while ($pr=mysql_fetch_assoc($get_count_parts2))
{
echo"else if (zart".$pr['PartID']."=='' && name".$pr['PartID']."!='') {alert('Art for ".$pr['ProdDesc']." was not specified'); return false;}";
}
echo "} return true;
} </script>";