In the following javascript code,
needSubIdCheck = $("#needSubIdCheck").text();
liveSupplierCount = $("#liveSupplierCount").text();
subIdCount = $("#subIdCount").text();
if(needSubIdCheck == 'true')
{
if( liveSupplierCount > subIdCount )
{
alert("subIDS Needs to be assigned");
return false;
}
}
The above code gives, "Uncaught TypeError: alert is not a function" in the console. If I change the alert with window.confirm or console.log everything is fine. Can anyone help me to come out of this problem?
Nothing is wrong in the given code. Can you check if you are using any pop-up-blockers, this could happen some times. Also check if you have override the alert (var alert = ...
,window.alert
) some were in the code. This could happen if you are using some external js files as well. For the time being comment out external js files and check if alert is working