Dear all,
I have the php page with javascript. If I have php variable, can it be used in javascript to check the flag or I need to hardcode it in javascript as shown below of “checkServiceCategory”? Dynamic or static??
php
<?php
foreach ($result as $id=>$value) {
if([B]$value[0]->isServiceCategory
return true;
}
//——————Or ———————————-//
isEmptyUploadFile(function(r)
{
var checkServiceCategory=document.getElementById(‘category-group’).value;
if([B]checkServiceCategory!=85
{
$(“#uploadImgError”).html(‘<em><span style=”color:red”> <i class=”icon-cancel-1 fa”></i> Please Upload at least one image!</span></em>’);
location.href = “#uploadImgError”;
return false;
}
else