Condivido le tue osservazioni: mancano le virgolette negli ultimi attributi, ma sono così anche nella versione con immagini. Ed è vero, mancano le chiamate allo script, ma è così anche nell'originale.
Questa è la pagina completa:
<% Option Explicit %>
<%
'
' :@message.asp
'
'
'
' @author Peter Theill peter@theill.com
'
Response.Buffer = True
Dim userId
userId = CStr(Request("chatId"))
If (NOT isLoggedIn(userId)) Then
Response.Write("<font size=1>Please Wait ...</font>")
Response.End
End If
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title><%= APPLICATION_NAME %></title>
<link rel="stylesheet" type="text/css" href="chat.css">
<link rel="stylesheet" type="text/css" href="../krawlerz.css">
<script language="JavaScript">
<!--
var justSent = false;
function onSendMessage()
{
// user wants to open up the help screen
if ((document.frmControl.message.value == '/help') || (document.frmControl.message.value == '/?'))
{
openHelp();
return false;
}
// don't speed-limit message if it's empty (user wants to refresh chat)
if (document.frmControl.message.value == '')
return true;
<% If (MESSAGE_FLOOD_TIMEOUT > 0) Then %>
if (justSent)
{
alert('Stai digitando troppo velocemente. Devono passare almeno 3 secondi tra i messaggi che posti.');
return false;
}
// avoid users spamming by sending a lot of messages all the time
justSent = true;
setTimeout('justSent = false;', <%= MESSAGE_FLOOD_TIMEOUT %>);
<% End If %>
document.frmControl.message.select();
return true;
} // > function onSendMessage()
function openHelp()
{
var mConquerChatHelp = window.open(
'help.asp',
mConquerChatHelp,
'toolbar=no,width=350,height=350,resizable=0'
);
mConquerChatHelp.focus();
}
function logoffUser()
{
// var mConquerChatLogoff
// window.open('logoff.asp', mConquerChatLogoff, 'toolbar=no,width=380,height=380,resizable=0');
}
/**
* Clears all text in message box.
*
* Function is called from 'window.asp' after it has been reloaded.
*
*/
function clearMessageArea()
{
if (typeof document.frmControl != 'undefined' && document.frmControl.message != 'undefined')
{
document.frmControl.message.value = '';
return true;
}
return false;
}
// -->
</SCRIPT>
<base target="_self">
</head>
<body bgcolor="#C48D5A">
<form name="frmControl" method="POST" target="messages" action="window.asp" onSubmit="return onSendMessage()">
<input type="hidden" name="mode" value="message">
<input type="hidden" name="chatId" value="<%= userId %>">
<input type="hidden" name="roomId" value="">
<table width=100% border=0 cellspacing=0 cellpadding=2 height="48">
<tr>
<td colspan=4 height="8"><font color="#663300" size="1" face="Arial, Helvetica, sans-serif">
[img]/gif/newsline.gif[/img]</td>
</tr>
<tr>
<td colspan=4 class="titolo" height="16">.messaggio</td>
</tr>
<tr>
<td width="100%" height="12">
<input type="text" class="form" name="message" size="70" taborder="1"></td>
<td height="12"><input name="submit" type="submit" class="button" value=".invia" tabindex="1" style="width: 48"></td>
<td align="right" height="12">
<span style="background-color: #663300" class="body"><a href="javascriptpenHelp()" STYLE="cursor: default">
<font color="#CC6600">.aiuto</font></a></td>
<td height="12"><input type="submit" name="logoff" class="button" value=".esci" style="width: 48" taborder=3 border=0></td>
</tr>
</table>
</form>
<script language="JavaScript">
<!--
if ((typeof document.frmControl != 'undefined') && (typeof document.frmControl.message != 'undefined'))
document.frmControl.message.focus();
// -->
</script>
</body>
</html>
Non sto a postarti il codice di quella con immagini, ma è assolutamente identico, eccetto le righe che qui sono in rosso e nell'originale sono come nel mio post precedente, solo che con immagini funziona e testuale no.![]()