The Most Humble Dump
Adding To It
On this page we will add a pop up and a whisper panel you know about the wtvchat tag. It goes in the head container.<head> along with the function definitions
<html>
<head>
<wtvchat host="chat.talkcity.com" port="6667" channel="#hereitisnow">
and you know how to define a text input message function
<script language="Javascript">
function A( ) {
Chat.addChannelMessage(document.a.b.value)
document.a.b.value = ""
}
</script>
</head>
And you know about the wtvchattranscript, forms and their id's. They go in the body container
<body bgcolor=262626>
<wtvchattranscript width=550 height=200>
<form id="a" action="javascript:A( )">
<input id="b" type="text" width=550>
</form>
</body>
</html>
Now we will define a popup definition. This function definition goes in the head just like all function definitions and it still uses the
Chat.addChannelMessage( ) BUT instead of putting the form id's in the parenthesis, you will put the actual text which you want to appear on the transcript (screen). You would define a pop up message like this
<script language="JavaScript">
function pop1( ) {
Chat.addChannelMessage(" Hey Look!! This stuff is fun. Or it is to me. Why doesn't everyone just make their own? Why 'steal' someone else's when this is soooo easy!! OH Man you Gotta make your own!! OH YEA!!!!")
}
</script>
Notice that the message is inclosed in quotes. DO NOT use quotes in the message. There is some cases where you have to, but that is in the next lesson. For a regular pop up use ' ' if you want to indicate a quote. See how I did it around the word, 'steal'. When I fix these for people, quotes in the pop ups are the #1 cause of failure, DON'T DO IT.
To call the pop up function (send a pop up message) you can use a button or a text link or an image link. We'll use a text link here. The function call goes anywhere in the body container.
<a href="javascript:pop1( )">My inane pop up</a>
To send the message using a button, you should use the "onClick" function call. Just make a form and a button and add the onClick call like this:
<form>
<input type="button" onClick="pop1()">
</form>
This is a very simple button. We will get into the "fancy" buttons later
Putting a whisper panel button on here is very easy. Most people want the whisper button on the line with the first "message box". To get it on the same line as the message input you will need to make the width of the message form more narrow.. we'll try 425. That gives you a 125 pixel of width for your button. Approximately
<form id="a" action="javascript:A( )">
<input id="b" type="text" width=425>
</form>
<input type="button" value="whisper" onClick="window.open('whisper.panel', 'whisper')">
That is the entire thing. Now look at the improved chat with the pop up and whisper panel . There is a textarea below the chat which contains all of the codes. Now go to the
next page we will add some more functions to it
[ IRC list ] [ Server List ] [ First page ] [ Page 3 ]
T