What if you don't see anything? Then switch on the console by pressing F12.
Warning: you will see an error message: prototype.js (regel 6598, kol 4); this is a bug and will not break your code!

hello world: with jquery

jQuery: it is already there: D:\tomcat\webapps\oc341\includes\jmesa
What is jQuery? The people who contribute to jQuery lovingly say it is "The Write Less, Do More, JavaScript Library".
It has a number of built-in functions that make javascripting easier.
To demonstrate how jQuery works, we'll switch to notepad++ and change "document.write('hello world');" to:

When you do this and refresh your screen you will see only hello world, which is a bit too much! JQuery "takes over"
your whole HTML-document and we don't want to go that far.
Create a so-called div or division in your CRF with the name DivToShowText

<div id='DivToShowText'></div>

Now you can make a reference to this "object" by using the function: $("#DivToShowText")
And we not only want to make a reference to it, we want to change it, or rather we want to change the html that is in the div. this we do with:

$("#DivToShowText").html('hello world');

Big steps! We've written script in our page that will be executed, the moment that all objects of the document are present, or in other words, when the document is ready.

You can see this even more clearly when you change

<div id='DivToShowText'></div>

into

<div id='DivToShowText'>goodbye world</div>

This is a good start, but of course we want to interact with whatever is entered into the CRF. Now, as we saw, our div has an id,
and so do all objects of the document. However these id's are not "logical" in any way. For example the input of our item is called "input10".

Now it would be nice to refer to the input directly. This we do with a trick: we start with our div "DivToShowText".
This div is in a td and the td is part of a tr, which is part of a table. If you want to see which table, go upwards to around line 815 where it says

<table border="0">
<tr>
<td valign="top" class="aka_ques_block"></td>

and then change that to table border="1".
We will walk to the input by taking this "route": first go to the parent of the div ad this is the td. Then go to the parent of the td and this is the tr.
Now in this tr, we look for objects of type "input". And the result is

$("#DivToShowText").parent().parent().find("input");

We're almost at the point where we can do something sensible. The score so far: we can read and write and we can refer a bit.
Now we must look at the timing. Suppose we don't want to say "hello world", but "you just wrote ..."
and then the content of what the user entered in the CRF-item. This means in fact two things:

reading the value of the item and displaying it

updating it when anything changes

As for 1, let's settle that first. We rewrite our jQuery(document).ready function and we give the CRF-item a name, like myItem.
We can then read the value of it with the method .val()

If we now reload the page, we just see "you just wrote" and nothing more, even if we write something in the item.
We must execute the action again if anyhing is entered in the CRFItem, step 2. This we do by using the function keyup:

Now it is obvious that we are repeating ourselves here, so we put the action in a function called "executeMyActions()"
and we call this function whenever something is typed in the input and also when the document is ready: