[PHP]<? $init=false; ?>
<script language="JavaS cript">var init=false;
if(!init){init= confirm('Are you sure You want to confirm the test results for '+'<?=$mm_cde."--".$mbatchno?>') ;}
alert('ss'+init );
if(!init){
alert('fffff'+i nit);<? $init=false;?>} ;
else{
alert('ttt'+ini t);<? $init=true;?>;
}
alert('<?=$init ?>');
</script>
<? if((int)$init== 1){
?><script>alert ('yes');</script><?
}
else{
?><script>alert ('yes');</script><?
}
<?[/PHP]
this always alerts yes ieven if i press cancel
wot's wrong with the code
thanks in advance
<script language="JavaS cript">var init=false;
if(!init){init= confirm('Are you sure You want to confirm the test results for '+'<?=$mm_cde."--".$mbatchno?>') ;}
alert('ss'+init );
if(!init){
alert('fffff'+i nit);<? $init=false;?>} ;
else{
alert('ttt'+ini t);<? $init=true;?>;
}
alert('<?=$init ?>');
</script>
<? if((int)$init== 1){
?><script>alert ('yes');</script><?
}
else{
?><script>alert ('yes');</script><?
}
<?[/PHP]
this always alerts yes ieven if i press cancel
wot's wrong with the code
thanks in advance
Comment