Hi,
I have a form, in that i created a dropdown list element and then i used javaScript to add the options to the dropdown list dynamically(i get the values from the previous stage of the workflow).But when i run , i found an error that my javascript can not able to get the element(document.getElementById is null). Can anyone help me with the issue,
<h1>Email Notification</h1>
<table>
<tr>
<td>
<label>
Employee Email ID:<br/>
<input type="text" name="email" id="email" value="@tomaxx.de"/>
<input type="text" name="user" id="user" value="${user1}"/>
<select name="combo" id="combo" >
<option value="text">please slect</option>
</select>
</label><br/>
</td>
</tr>
</table>
<script language="javascript" type="text/javascript">
var userString=${user1}.toString();
var mySplitString=userString.split(",");
for(var i=0;i<mySplitString.length;i++){
var opt = document.createElement("option");
opt.text=mySplitString;
opt.value=i;
document.getElementById('combo').innerHTML.options.add(opt);
}
</script>