Me gustaria saber que es lo que está mal, estoy usando Electro Server. Si alguin sabe de algo por favor aviseme, muchas gracias, el codigo usado es este:
Código :
mySocket = new XMLSocket();
mySocket.onConnect = function(success)
{
if (success)
msgArea.htmlText += "<b>Server connection established!</b>"
else
msgArea.htmlText += "<b>Server connection failed!</b>"
}
mySocket.onClose = function()
{
msgArea.htmlText += "<b>Server connection lost</b>"
}
XMLSocket.prototype.onData = function(msg)
{
msgArea.htmlText += msg
}
mySocket.connect("localhost", 9875)
//--- Handle button click --------------------------------------
function sendMsg()
{
if (inputMsg.htmlText != "")
{
mySocket.send(inputMsg.htmlText + "\n")
}
}
Saludosss
[zah] Usa las etiquetas code para escribir código [/zah]
