I need to create a jsp form with javascript. The problem is to assign the data path.
Imagine $form.work = "Hello Work";
If I create the form with html:
<div id='workForm'>
Work:<input value=${form.work}></input>
</div>
The input will show the work value (Hello Work). But I need to create this div form with js, something like:
var oDiv = document.createElement('div');
oDiv.setAttributte('id', 'workForm');
var oInput= document.createElement('input');
oDiv.appendChild(oInput)
...
I tryed to add an attribute to the input like:
oInput.addAttributte('value', '${form.work}')
But it shows: ${form.work} not Hello Work
Can someone help me?
Thanks!