gdc_cmod/app/Views/admin/modal_request.php
2025-11-25 14:14:14 +07:00

39 lines
1.4 KiB
PHP

<div class='row mb-2 mx-2'>
<div class="col">val : <?=$val1user;?> - <?=$val2user;?></div>
<div class='col text-end'>
<button id='result-button' class='btn btn-xs btn-success' onclick='validate(<?=$accessnumber;?>, "<?=session('userid');?>" )' disabled>Verify</button>
</div>
</div>
<div class="row mx-auto">
<!-- <iframe id="result-iframe" src="http://glenlis/spooler_db/main_dev.php?acc=<?=$accessnumber;?>" width="750px" height="600px"> -->
<iframe id="result-iframe" src="<?=base_url('dummypage');?>" width="750px" height="600px">
<p>Your browser does not support iframes. Please contact the technical support.</p>
</iframe>
</div>
<script>
{
// verifymodal
let iframe = document.getElementById('result-iframe');
let button = document.getElementById('result-button');
iframe.addEventListener('load', () => {
//console.log('loaded');
let iframeDoc = iframe.contentDocument || iframe.contentWindow.document;
let scrollElement = iframeDoc.scrollingElement || iframeDoc.documentElement;
iframeDoc.addEventListener('scroll', () => {
let scrollTop = scrollElement.scrollTop;
let scrollHeight = scrollElement.scrollHeight;
let clientHeight = scrollElement.clientHeight;
// Check if scrolled to bottom
if (scrollTop + clientHeight >= scrollHeight - 2) {
button.disabled = false;
}
});
});
}
</script>