You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

JavaScript in Knowledge Base Answer

Question
21
Views
0
Comments
edited May 10, 2019 2:06PM in Knowledge Management

Summary

The javascript doesn't seem to work

Content

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" />

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!