I have a simple javascript that i keep using in every page I have, and I want to make it a function and add some additional feature, if i click that loading_input(div) from display:block change to display:none
I try but I have no luck can someone guide me to make it work..
example:
<script type="text/javascript">
document.getElementById("instructor").onchange = function() {
document.getElementById("loading_input").style.display = "block";
document.getElementById("instructor").style.color = "#fff";
}
document.getElementById("subject_scheduling").onchange = function() {
document.getElementById("loading_input").style.display = "block";
document.getElementById("subject_scheduling").style.color = "#fff";
}
</script>
instructorandsubject_scheduling? You are saying "when i click", so maybe you should use.onclickinstead of.onchangeinstructoris anidofinput fieldwhere i use to add value before making any event.