call JavaScript after page load
This can be used to hide some elements.
2 ways:
after DOM is constructed
<script>
alert("page is loaded");
</script>
b) using jQuery - mostly placed in head section:
<script>
$(document).ready(function() {
alert("page is loaded");
});
</script>
Set visibility of items
Hide element based on selected item in dropdown list (<select>).
<script>
var optionList = document.getElementById('customerTypeSelection');
var customerTypeId = Number(optionList.options[optionList.selectedIndex].value.split(',', 1));
var acquirersRow = document.getElementById("Acquirers");
if (customerTypeId == 7) {
acquirersRow.style.display = '';
} else {
acquirersRow.style.display = 'none';
}
</script>
No comments:
Post a Comment