I have a GRID with a dropdown-button. Depending the clicked value a function is called.
OnRecord:
{dropBS}=’ <div class=“w3-dropdown-hover w3-right”>
<button id=“DropBS” class=“w3-button w3-padding-small w3-teal”>+<span class=“caret”></span></button>
<div class=“w3-dropdown-content w3-bar-block w3-border” style=“right:0”>
<a href="#" onclick=“nok()” class=“w3-bar-item w3-button” value=1>nok</a>
<a href="#" onclick=“ok()” class=“w3-bar-item w3-button” value=3>ok</a>
</div>
</div>’;
OnScriptInit: functions declared ?>
<script type=“text/javascript”>
function ok() { CODE…
}
function nok() { CODE...
}
</script>
<?php
Now the question. I want to run some PHPcode in one of the JS-functions. To change the value of a table
sc_exec_sql(“UPDATE tblDoc SET Vervallen = 1 WHERE idDOC = 5;”);
What is the format to do so? Is this the right way to do so?