Yo grabo un nuevo producto, le añado unos tags.
Al entrar a esa página de productos como administrador veo abajo todos los registros guardados.
Si le pico a uno se me rellenan todos los campos con los datos de ese producto.
El problema viene con el select multiple, porque se me rellena con los tags seleccionados, pero no consigo trabajar correctamente con ellos, no me deja actualizarlos, ni borrarlos, ni nada ¡¡
Eso es lo que quiero conseguir.
Aquí pongo una parte de código
Un saludo ¡¡¡
Código:
<select name="lista" class="textonormal" id="lista" size="15" style=" font-size:9px;width:200px " multiple ondblclick="anadir(this.form)">
<%do while not rsS.eof%>
<option value=<%=rsS("id")%>><%=rsS("Nombre")%></option>
<%rsS.movenext
loop
rsS.close
%>
</select></td>
<td width="18%"><div align="center">
<input name="add" type="button" id="add" value=" > " onClick="anadir(this.form)">
<br>
<input name="addAll" type="button" id="addAll" value=">>" onClick="anadirTodos(this.form)">
<br>
<input name="deleteAll" type="button" id="deleteAll" value="<<" onClick="eliminarTodos(this.form)">
<br>
<input name="BDelete" type="button" id="BDelete" value=" < " onClick="eliminar(this.form)">
<br>
</div></td>
<td width="41%">
<%if identificador="" then%>
<select name="seleccionados" size="15" multiple class="textonormal" id="seleccionados" style=" font-size:9px;width:200px " ondblclick="eliminar(this.form)"></select>
<%else%>
<select name="seleccionados" size="15" multiple class="textonormal" id="seleccionados" style=" font-size:9px;width:200px " ondblclick="eliminar(this.form)">
<%Set Rstag = CreateObject("ADODB.RecordSet")
SqlTexttag = "SELECT idtag FROM relacional WHERE tipo=0 and idOrigen="&identificador
Rstag.Open SqlTexttag, DnsText2,3,3
if not Rstag.eof then
Do while not rstag.eof
Set Rs3 = CreateObject("ADODB.RecordSet")
SqlText3 = "SELECT nombre FROM Tags WHERE id="&rstag("idtag")
Rs3.Open SqlText3, DnsText2,3,3
if not Rs3.eof then
nombredeltag=rs3("nombre")
end if
rs3.close
%>
<option value=<%=rstag("idtag")%>><%=nombredeltag%></option>
<%rstag.movenext
loop
end if
Rstag.close%>
</select>
<%end if%>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td align="right"><span class="Estilo14">Observaciones</span></td>
<td><label>
<input name="observaciones" type="text" id="observaciones" size="50" value="<%=Observaciones%>" />
</label></td>
</tr>
<tr>
<td align="right" valign="top" class="Estilo14"> </td>
<td> </td>
</tr>
<tr>
<td align="right" valign="top" class="Estilo12"> </td>
<td><input type="reset" name="Submit2" value="Nuevo" />
<%if session("tipodeusuario")="admin" then%>
<input type="submit" name="Submit" value="Guardar / Modificar" />
<%else%>
<input type="submit" name="Submit" value="Guardar" />
<%end if%> </td>
</tr>
</table>
</form>