For partners that build or integrate commercially available applications and service solutions with the Oracle Cloud Platform
For partners that provide implementation or managed services around Oracle Cloud Applications
Dear all,
I have a javascript embedded in the html source code on a KB Answer (cf. below source code). When I press the html button linked to the function "clear_all()" then test1 is correctly shown, but not test2, even though I do have a div with an ID called contentDiv. I am wondering if I have done something wrong, even though the code works outside KnowledgeBase...
<div style="background-color: rgb(0,0,0); color: white">
<form action="#" class="form_class" id="form_id" method="post" name="form_name">
<input id="btn_id" name="submit_id" onclick="clear_all()" type="button" value="Check the courses" />
</form>
</div>
<div id="contentDiv">This is the content.</div>
<script type="text/javascript" >
function clear_all() {
alert("test1");
var eleDiv= document.getElementByID("contentDiv");
alert("test2");
}
</script>
Kind regards,
Liz