Click here to download an image
Is it possible to dynamically append a combobox below the User combobox when the "ADD" button is clicked using JavaScript?
I attempted this with jQuery last night, but I couldn't get it to work properly.
<g:select name="user.id" from="${userdetailsList?.firstName}" noSelection="['':'User']"/>
<html>
<head>
<g:set var="entityName" value="${message(code: 'CurrencyList.label', default: 'CurrencyList')}" />
<title><g:message code="default.list.label" args="[entityName]" /></title>
</head>
<body>
<g:if test="${flash.message}">
<div id="userMessage" class="info" style="color:orange;background-color:#d0e4fe;">${flash.message}</div>
</g:if>
<table align="left">
<tbody>
<tr>
<td style="font-size:20px;" colspan="3"><b>Group Add</b></td>
</tr>
<tr>
<td width="70">Name</td>
<td width="5">:</td>
<td><g:textField name="namagrup" value="${nama}" /></td>
</tr>
<tr>
<td>Description</td>
<td>:</td>
<td><g:textArea name="deskripsigrup" value="myValue" rows="5" cols="40"/></td>
</tr>
<tr></tr>
</tbody>
</table>
<ol>
<h3 >User</h3>
<br>
<div id="selects"><g:select name="user.id"
from="${userdetailsList?.firstName}"
noSelection="['':'User']" /> </div>
<button>ADD</button>
<br>
</ol>
</body>
</html>