I have a quesion can I hit the database on my view?
I have function like this..
function ShowHIPAATab(url) {
if ($("#BxFlag").val() == "1") {
$("#bv-1").attr('src', url);
} else {
return false;
}
};
on this funcation I need to hit the database to get the BXFlag value.how to do that?
So this being javascript it is running in the browser not the server, so you don’t have direct access to the database. Depending on your situation there a couple ways you can get this value: