Tengo un problema con una variable la cual la estoy generando y alimentando de forma dinamica, para que cuando se vaya a usar por el cliente con un doble click un codigo en javascript se ejecute, el problema es que una de las variables que van dentro de una de esas variables tiene texto y con enters y cuando se esta ejecutando las lineas de mi codigo me saca un error de java script, como hago para solucionar este problema?
Este es mi codigo:
<%while not rs.eof
i=i+1
vart=rs("observacion")
abc="parametros("+"'"+rs("codusuario")+"'"+","+"'" +rs("nombre")+"'"+","+"'"+rs("descripcion")+"',"+" '"+rs("codelemento_informatico")+"'"+",'"+vart+"') "%>
<tr id="this" onDblClick="<%=abc%>" onMouseOver="this.style.backgroundColor='#0066ff'; this.style.backgroundColor='#0066ff'; this.style.color='#ffffff';this.style.color='#ffff ff'" onMouseOut="this.style.backgroundColor='#ffffff';t his.style.backgroundColor='#FFFFFF'; this.style.color='#000000'; this.style.color='#000000'">
<td id="TRCon"><div align="center"> <%=rs("Nombre")%> </div></td>
<td id="TRCon"><div align="center"> <%=rs("descripcion")%></div></td>
<td id="TRCon"><div align="center"> <%=rs("codelemento_informatic o")%></div></td>
<td id="TRCon"><div align="center"> <%=rs("observacion")%></div></td>
</tr>
<%
rs.movenext
wend
la variable es
abc
y la salida en el cliente es para esta parte del codigo es:
<tr id="this" onDblClick="parametros('33434','EDGAR SALCEDO','CPU DELL OPTIPLEX GXM 513','677755','ESTA ES UNA PRUENA DE SALVADO')" onMouseOver="this.style.backgroundColor='#0066ff'; this.style.backgroundColor='#0066ff'; this.style.color='#ffffff';this.style.color='#ffff ff'" onMouseOut="this.style.backgroundColor='#ffffff';t his.style.backgroundColor='#FFFFFF'; this.style.color='#000000'; this.style.color='#000000'">
<td id="TRCon"><div align="center"> EDGAR SALCEDO </div></td>
<td id="TRCon"><div align="center"> CPU DELL OPTIPLEX GXM 513</div></td>
<td id="TRCon"><div align="center"> 677755</div></td>
<td id="TRCon"><div align="center"> ESTA ES UNA PRUENA DE SALVADO</div></td>
</tr>
<tr id="this" onDblClick="parametros('99880','JOSE IGNACIO MAPPE','COMPAQ PRESARIO 12758','JBSDJE7733','ESTA ES UNA PRUEBA PARA
VER COMO SALVA LA INFORMACION')" onMouseOver="this.style.backgroundColor='#0066ff'; this.style.backgroundColor='#0066ff'; this.style.color='#ffffff';this.style.color='#ffff ff'" onMouseOut="this.style.backgroundColor='#ffffff';t his.style.backgroundColor='#FFFFFF'; this.style.color='#000000'; this.style.color='#000000'">
<td id="TRCon"><div align="center"> JOSE IGNACIO MAPPE </div></td>
<td id="TRCon"><div align="center"> COMPAQ PRESARIO 12758</div></td>
<td id="TRCon"><div align="center"> JBSDJE7733</div></td>
<td id="TRCon"><div align="center"> ESTA ES UNA PRUEBA PARA
VER COMO SALVA LA INFORMACION</div></td>
</tr>
Muchas gracias por la ayuda.