?
Solved

Help with form losing focus

Posted on 2006-04-23
5
Medium Priority
?
409 Views
Last Modified: 2010-04-07
Hello Experts. One form contains a browser control whose url is dynamic php chat room. Other forms contain browser controls displaying personal profiles, private message windows, etc. Well, everytime there's activity in the chat room--i.e., text chatting!--focus is lost from all other forms. Thus, people have much difficulty typing a private message in one form, because the focus keeps being taken away by activity in the chat room. Hence my quesion:

How can I prevent losing focus on other forms despite what's happening over the web in the form containing the chat room?

Many thanks in advance,
John
0
Comment
Question by:John Account
  • 2
  • 2
4 Comments
 
LVL 8

Expert Comment

by:Leo Eikelman
ID: 16527771
well the form that contains the chat room should not gain focus automatically unless you are explicitely telling it to gain focus... are you doing this anywhere?

can we a code sample from your chat room?

Leo

0
 

Author Comment

by:John Account
ID: 16549249
I'm not explicitely or otherwise telling the form to gain focus. Below is the chat room code you requested:

<html>
<head>
<script language="JavaScript" src="inc/cf.js"></script>
<script language="JavaScript" src="inc/chatxm.js"></script>
<SCRIPT language="Javascript" src="inc/XMLDOMWrapper.js"></SCRIPT>
<script language="JavaScript" src="inc/toast.js"></script>
<script language="JavaScript" src="inc/chat_im.js"></script>
<script language="JavaScript" src="inc/menu.js"></script>
<script language="JavaScript" src="inc/emoticons.js"></script>
<script LANGUAGE="VBScript">
      Sub FlashSocket_FSCommand(ByVal command, ByVal args)
            call FlashSocket_DoFSCommand(command, args)
      end sub
</script>
<script>
function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}
</script>

<title>Chat Room</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css" href="inc/chatxm.css">
<base target="_blank">
</head>

<BODY topmargin=0 scroll="no" onload="initChat();" onunload="Disconnect();" topmargin="0"  leftmargin="0" marginheight="0" marginwidth="0">

<span style="visibility:hidden;display:none;" id="ChatTo"></span>
<span style="visibility:hidden;display:none;" id="ChatKey"></span>

<table id="ChatWrapper" border="0" cellpadding="0" cellspacing="1" width="100%" height="100%">
      <tr>
            <td colspan="2" height="20">
                  <div id="ToolbarDiv" class="ChatToolBar">
                        &nbsp;&nbsp;<span id="myInfo" class="myInfo" onClick="showStatusMenu();"></span>
                        &nbsp;&nbsp;<img border="0" onclick="showEmoticons('bottom');" SRC="inc/emoticon.gif"><img SRC="inc/icon_emo_down.gif" width="7" height="5" alt="" border="0">
                        <img SRC="inc/save.gif" width="23" height="22" alt="Save Conversation" onclick="SaveConversation();" border="0">
                        <img SRC="inc/icon_font.gif" width="23" height="22" alt="Font Settings" onclick="changeFont(this);" border="0">
                        <img SRC="inc/icon_sound_on.gif" id="soundIcon" width="20" height="17" alt="Turn On/Off Sound" onclick="toggleSound();" border="0">
                  <a href="createroom.php" target="_parent">                              Create Your Own Room </a>
                  </div>
            </td>
      </tr>
      <tr>
            <td valign="top" width="900" height="90%">
                  <div id="ChatWindow" class="ChatWindow"></div>
            </td>
            <td width="50" height="90%" valign="top" bgcolor="#8693bf"><div id="Roster" class="ChatRoster"></div>
        </td>
      </tr>
      <tr>
            <td colspan="2" height="50" nowrap>
                  <table border="0" cellpadding="0" width="100%" cellspacing="0">
                        <tr>
                              <td width="450">
                              <textarea onFocus="amIFocused=true;" style="font-family:Verdana, Arial, Helvetica, sans-serif;font-size:10px;font-weight:normal;" onBlur="amIFocused=false;" class="ChatInput" id="ChatBox" mode="txt" onKeyUp="if (event.keyCode == 13) sndChatMsg(); else {sndComp();this.focus();}" ></textarea>                              </td>
                              
                              <td width="40">
                                    <div align="center"><img src="inc/button_chat.gif" style="cursor:hand;cursor:pointer;" onClick="sndChatMsg();" border="0">                                    </div></td><td width=134 align=middle>
                          
                             <select name="select" class="baseline2" onChange="MM_jumpMenu('parent',this,0)">
                                  <option value=chat.php?room_type=public&user_name=John&nick_name=John&room_id=Lounge selected>Public Rooms</option>
                                  <option value=chat.php?room_type=public&user_name=John&nick_name=John&room_id=Lounge>Lounge</option>
                                  <option value=chat.php?room_type=public&user_name=John&nick_name=John&room_id=Bar>Bar</option>
                                  <option value=chat.php?room_type=public&user_name=John&nick_name=John&room_id=Single_Parents>Single_Parents</option>
                                  <option value=chat.php?room_type=public&user_name=John&nick_name=John&room_id=Coffee_Shop>Coffee_Shop</option>
                                  <option value=chat.php?room_type=public&user_name=John&nick_name=John&room_id=Book_Store>Book_Store</option>
                                  <option value=chat.php?room_type=public&user_name=John&nick_name=John&room_id=Sauna>Sauna</option>
                                  <option value=chat.php?room_type=public&user_name=John&nick_name=John&room_id=Franco>Franco</option>
                                 
<option value=chat.php?room_type=public&user_name=John&nick_name=John&room_id=&#33394;>&#33394;</option><option value=chat.php?room_type=public&user_name=John&nick_name=John&room_id=123456>123456</option><option value=chat.php?room_type=public&user_name=John&nick_name=John&room_id=dipstick's room>dipstick's room</option><option value=chat.php?room_type=public&user_name=John&nick_name=John&room_id=ç&#305;t&#305;rk&#305;zla>ç&#305;t&#305;rk&#305;zla</option><option value=chat.php?room_type=public&user_name=John&nick_name=John&room_id=pakistan:21>pakistan:21</option><option value=chat.php?room_type=public&user_name=John&nick_name=John&room_id=35>35</option><option value=chat.php?room_type=public&user_name=John&nick_name=John&room_id=SEXandCITY>SEXandCITY</option><option value=chat.php?room_type=public&user_name=John&nick_name=John&room_id=love>love</option><option value=chat.php?room_type=public&user_name=John&nick_name=John&room_id=gay men>gay men</option><option value=chat.php?room_type=public&user_name=John&nick_name=John&room_id=Sex chat>Sex chat</option>                      </select>
                    <br>                                 
                        <select name="select" class="baseline2" onChange="MM_jumpMenu('parent',this,0)">
                                     <option selected>Private Rooms</option>
                                <option value=chat.php?user_name=John&nick_name=John&type=private&room_id=DuRuK>DuRuK</option><option value=chat.php?user_name=John&nick_name=John&type=private&room_id=kellylychihiro>kellylychihiro</option><option value=chat.php?user_name=John&nick_name=John&type=private&room_id=simo989>simo989</option><option value=chat.php?user_name=John&nick_name=John&type=private&room_id=hehe9394>hehe9394</option><option value=chat.php?user_name=John&nick_name=John&type=private&room_id=FatherBob>FatherBob</option><option value=chat.php?user_name=John&nick_name=John&type=private&room_id=xBeastiex>xBeastiex</option><option value=chat.php?user_name=John&nick_name=John&type=private&room_id=mbberke>mbberke</option><option value=chat.php?user_name=John&nick_name=John&type=private&room_id=mitaga>mitaga</option><option value=chat.php?user_name=John&nick_name=John&type=private&room_id=lizardog>lizardog</option><option value=chat.php?user_name=John&nick_name=John&type=private&room_id=homecook>homecook</option><option value=chat.php?user_name=John&nick_name=John&type=private&room_id=renardoangel>renardoangel</option><option value=chat.php?user_name=John&nick_name=John&type=private&room_id=ilker>ilker</option><option value=chat.php?user_name=John&nick_name=John&type=private&room_id=ajanssen>ajanssen</option><option value=chat.php?user_name=John&nick_name=John&type=private&room_id=ameeralhoop>ameeralhoop</option><option value=chat.php?user_name=John&nick_name=John&type=private&room_id=elmer12>elmer12</option><option value=chat.php?user_name=John&nick_name=John&type=private&room_id=yusuff>yusuff</option><option value=chat.php?user_name=John&nick_name=John&type=private&room_id=dvlman668>dvlman668</option><option value=chat.php?user_name=John&nick_name=John&type=private&room_id=sphlnx>sphlnx</option>                          </select>      </td>
                                  <td width=251 align=middle>&nbsp;</td>
                        </tr>
                  </table>
            </td>
      </tr>
      <tr>
            <td class="StatusDiv" id="StatusDiv" colspan="2" height="22" nowrap>Loading...</td>
      </tr>
</table>
<span style="position:absolute;top:400;">
<!-- text used in the movie-->
<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
 codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"
 WIDTH="1" HEIGHT="1" id="FlashSocket" ALIGN="">
 
 <PARAM NAME=movie VALUE="inc/Flashsocket.swf">
 <PARAM NAME=quality VALUE=high>
 <PARAM NAME=bgcolor VALUE=#FFFFFF>
  <param name="FlashVars" value="movieid=FlashSocket" />

      <EMBED
            NAME="FlashSocket"
            SRC="inc/FlashSocket.swf"
            WIDTH="1"
            HEIGHT="1"
            PLAY="false"
            LOOP="false"
            QUALITY="high"
            SCALE="SHOWALL"
            FlashVars="movieid=FlashSocket"
            swLiveConnect="true"
            type="application/x-shockwave-flash" pluginspace="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">
      </EMBED>
</OBJECT>
<!-- <applet codebase="inc/" height="0" width="0"
code="SocketClient.class" id="JavaSocket" name="JavaSocket" mayscript="yes"></applet>
 -->
</span>
<div id="FlashGateway"></div>

      <EMBED SRC="inc/newmessage.wav"
       NAME="notify"
       AUTOSTART=FALSE
       HIDDEN=true>

      <EMBED SRC="inc/online.wav"
       NAME="beep"
       AUTOSTART=FALSE
       HIDDEN=true>

<textarea style="display:none;" name="foo" id="ChatWindow"></textarea>
<span style="display:none;">
      <div id="toastDiv" onclick="parent.hideToast();" style="position:absolute;width:195;height:120;cursor:hand;font-family:verdana,Arial;font-size:10px;background:url(inc/toast_bg.gif);">
            <div style="position:absolute;top:7;left:10;width:100;">
                  <img src="inc/icon_toast_im.gif" align="absmiddle">CamColada CHAT ROOM
            </div>
            <div style="position:absolute;top:7;left:175;">
                  <img src="inc/icon_close_toast.gif">
            </div>
            <div id="toastMsg" style="font-size:12px;padding:10px;position:relative;width:100%;top:60;text-align:center;"></div>
      </div>
</span>

<div id="emoticons" style="z-index:50;background-color:white;position:absolute;display:none;"
      onmouseover="onEmoticons = 1;"
      onmouseout="onEmoticons = 0;"
      onblur="if (onEmoticons == 0) this.style.display='none';">

<TABLE border="0" cellpadding="2" cellspacing="0">
<TBODY>
<TR>
<TD class="Emoticon" onmouseover="this.className='emoHoverClass;'" title=:) style="WIDTH: 20px" onclick="insEmoticon(this.title);" onmouseout="this.className='emoClass';"><IMG src="emoticons/regular_smile.gif"></TD>
<TD class="Emoticon" onmouseover="this.className='emoHoverClass;'" title=:d style="WIDTH: 20px" onclick="insEmoticon(this.title);" onmouseout="this.className='emoClass';"><IMG src="emoticons/teeth_smile.gif"></TD>
<TD class="Emoticon" onmouseover="this.className='emoHoverClass;'" title="<:o)" style="WIDTH: 20px" onclick="insEmoticon(this.title);" onmouseout="this.className='emoClass';"><IMG src="emoticons/74_74.gif"></TD>
<TD class="Emoticon" onmouseover="this.className='emoHoverClass;'" title=:o style="WIDTH: 20px" onclick="insEmoticon(this.title);" onmouseout="this.className='emoClass';"><IMG src="emoticons/omg_smile.gif"></TD>
<TD class="Emoticon" onmouseover="this.className='emoHoverClass;'" title=:p style="WIDTH: 20px" onclick="insEmoticon(this.title);" onmouseout="this.className='emoClass';"><IMG src="emoticons/tongue_smile.gif"></TD>
<TD class="Emoticon" onmouseover="this.className='emoHoverClass;'" title=;) style="WIDTH: 20px" onclick="insEmoticon(this.title);" onmouseout="this.className='emoClass';"><IMG src="emoticons/wink_smile.gif"></TD>
<TD class="Emoticon" onmouseover="this.className='emoHoverClass;'" title=:( style="WIDTH: 20px" onclick="insEmoticon(this.title);" onmouseout="this.className='emoClass';"><IMG src="emoticons/sad_smile.gif"></TD>
<TD class="Emoticon" onmouseover="this.className='emoHoverClass;'" title=:s style="WIDTH: 20px" onclick="insEmoticon(this.title);" onmouseout="this.className='emoClass';"><IMG src="emoticons/confused_smile.gif"></TD></TR>
<TR>
<TD class="Emoticon" onmouseover="this.className='emoHoverClass;'" title=:| style="WIDTH: 20px" onclick="insEmoticon(this.title);" onmouseout="this.className='emoClass';"><IMG src="emoticons/what_smile.gif"></TD>
<TD class="Emoticon" onmouseover="this.className='emoHoverClass;'" title=":'(" style="WIDTH: 20px" onclick="insEmoticon(this.title);" onmouseout="this.className='emoClass';"><IMG src="emoticons/cry_smile.gif"></TD>
<TD class="Emoticon" onmouseover="this.className='emoHoverClass;'" title=:$ style="WIDTH: 20px" onclick="insEmoticon(this.title);" onmouseout="this.className='emoClass';"><IMG src="emoticons/red_smile.gif"></TD>
<TD class="Emoticon" onmouseover="this.className='emoHoverClass;'" title=(H) style="WIDTH: 20px" onclick="insEmoticon(this.title);" onmouseout="this.className='emoClass';"><IMG src="emoticons/shades_smile.gif"></TD>
<TD class="Emoticon" onmouseover="this.className='emoHoverClass;'" title=:@ style="WIDTH: 20px" onclick="insEmoticon(this.title);" onmouseout="this.className='emoClass';"><IMG src="emoticons/angry_smile.gif"></TD>
<TD class="Emoticon" onmouseover="this.className='emoHoverClass;'" title=(a) style="WIDTH: 20px" onclick="insEmoticon(this.title);" onmouseout="this.className='emoClass';"><IMG src="emoticons/angel_smile.gif"></TD>
<TD class="Emoticon" onmouseover="this.className='emoHoverClass;'" title=(6) style="WIDTH: 20px" onclick="insEmoticon(this.title);" onmouseout="this.className='emoClass';"><IMG src="emoticons/devil_smile.gif"></TD>
<TD class="Emoticon" onmouseover="this.className='emoHoverClass;'" title=:-## style="WIDTH: 20px" onclick="insEmoticon(this.title);" onmouseout="this.className='emoClass';"><IMG src="emoticons/47_47.gif"></TD></TR>
<TR>
<TD class="Emoticon" onmouseover="this.className='emoHoverClass;'" title=8o| style="WIDTH: 20px" onclick="insEmoticon(this.title);" onmouseout="this.className='emoClass';"><IMG src="emoticons/48_48.gif"></TD>
<TD class="Emoticon" onmouseover="this.className='emoHoverClass;'" title=8o| style="WIDTH: 20px" onclick="insEmoticon(this.title);" onmouseout="this.className='emoClass';"><IMG src="emoticons/49_49.gif"></TD>
<TD class="Emoticon" onmouseover="this.className='emoHoverClass;'" title=^o) style="WIDTH: 20px" onclick="insEmoticon(this.title);" onmouseout="this.className='emoClass';"><IMG src="emoticons/50_50.gif"></TD>
<TD class="Emoticon" onmouseover="this.className='emoHoverClass;'" title=:-* style="WIDTH: 20px" onclick="insEmoticon(this.title);" onmouseout="this.className='emoClass';"><IMG src="emoticons/51_51.gif"></TD>
<TD class="Emoticon" onmouseover="this.className='emoHoverClass;'" title=+o( style="WIDTH: 20px" onclick="insEmoticon(this.title);" onmouseout="this.className='emoClass';"><IMG src="emoticons/52_52.gif"></TD>
<TD class="Emoticon" onmouseover="this.className='emoHoverClass;'" title=:^) style="WIDTH: 20px" onclick="insEmoticon(this.title);" onmouseout="this.className='emoClass';"><IMG src="emoticons/71_71.gif"></TD>
<TD class="Emoticon" onmouseover="this.className='emoHoverClass;'" title=*-) style="WIDTH: 20px" onclick="insEmoticon(this.title);" onmouseout="this.className='emoClass';"><IMG src="emoticons/72_72.gif"></TD>
<TD class="Emoticon" onmouseover="this.className='emoHoverClass;'" title=8-) style="WIDTH: 20px" onclick="insEmoticon(this.title);" onmouseout="this.className='emoClass';"><IMG src="emoticons/75_75.gif"></TD></TR>
<TR>
<TD class="Emoticon" onmouseover="this.className='emoHoverClass;'" title=|-) style="WIDTH: 20px" onclick="insEmoticon(this.title);" onmouseout="this.className='emoClass';"><IMG src="emoticons/77_77.gif"></TD>
<TD class="Emoticon" onmouseover="this.className='emoHoverClass;'" title=(c) style="WIDTH: 20px" onclick="insEmoticon(this.title);" onmouseout="this.className='emoClass';"><IMG src="emoticons/coffee.gif"></TD>
<TD class="Emoticon" onmouseover="this.className='emoHoverClass;'" title=(y) style="WIDTH: 20px" onclick="insEmoticon(this.title);" onmouseout="this.className='emoClass';"><IMG src="emoticons/thumbs_up.gif"></TD>
<TD class="Emoticon" onmouseover="this.className='emoHoverClass;'" title=(n) style="WIDTH: 20px" onclick="insEmoticon(this.title);" onmouseout="this.className='emoClass';"><IMG src="emoticons/thumbs_down.gif"></TD>
<TD class="Emoticon" onmouseover="this.className='emoHoverClass;'" title=(b) style="WIDTH: 20px" onclick="insEmoticon(this.title);" onmouseout="this.className='emoClass';"><IMG src="emoticons/beer_mug.gif"></TD>
<TD class="Emoticon" onmouseover="this.className='emoHoverClass;'" title=(d) style="WIDTH: 20px" onclick="insEmoticon(this.title);" onmouseout="this.className='emoClass';"><IMG src="emoticons/martini.gif"></TD>
<TD class="Emoticon" onmouseover="this.className='emoHoverClass;'" title=(x) style="WIDTH: 20px" onclick="insEmoticon(this.title);" onmouseout="this.className='emoClass';"><IMG src="emoticons/girl.gif"></TD>
<TD class="Emoticon" onmouseover="this.className='emoHoverClass;'" title=(z) style="WIDTH: 20px" onclick="insEmoticon(this.title);" onmouseout="this.className='emoClass';"><IMG src="emoticons/guy.gif"></TD></TR>
<TR>
<TD class="Emoticon" onmouseover="this.className='emoHoverClass;'" title=({) style="WIDTH: 20px" onclick="insEmoticon(this.title);" onmouseout="this.className='emoClass';"><IMG src="emoticons/guy_hug.gif"></TD>
<TD class="Emoticon" onmouseover="this.className='emoHoverClass;'" title=(}) style="WIDTH: 20px" onclick="insEmoticon(this.title);" onmouseout="this.className='emoClass';"><IMG src="emoticons/girl_hug.gif"></TD>
<TD class="Emoticon" onmouseover="this.className='emoHoverClass;'" title=:[ style="WIDTH: 20px" onclick="insEmoticon(this.title);" onmouseout="this.className='emoClass';"><IMG src="emoticons/bat.gif"></TD>
<TD class="Emoticon" onmouseover="this.className='emoHoverClass;'" title=(^) style="WIDTH: 20px" onclick="insEmoticon(this.title);" onmouseout="this.className='emoClass';"><IMG src="emoticons/cake.gif"></TD>
<TD class="Emoticon" onmouseover="this.className='emoHoverClass;'" title=(l) style="WIDTH: 20px" onclick="insEmoticon(this.title);" onmouseout="this.className='emoClass';"><IMG src="emoticons/heart.gif"></TD>
<TD class="Emoticon" onmouseover="this.className='emoHoverClass;'" title=(u) style="WIDTH: 20px" onclick="insEmoticon(this.title);" onmouseout="this.className='emoClass';"><IMG src="emoticons/broken_heart.gif"></TD>
<TD class="Emoticon" onmouseover="this.className='emoHoverClass;'" title=(k) style="WIDTH: 20px" onclick="insEmoticon(this.title);" onmouseout="this.className='emoClass';"><IMG src="emoticons/kiss.gif"></TD>
<TD class="Emoticon" onmouseover="this.className='emoHoverClass;'" title=(g) style="WIDTH: 20px" onclick="insEmoticon(this.title);" onmouseout="this.className='emoClass';"><IMG src="emoticons/present.gif"></TD></TR>
<TR>
<TD class="Emoticon" onmouseover="this.className='emoHoverClass;'" title=(f) style="WIDTH: 20px" onclick="insEmoticon(this.title);" onmouseout="this.className='emoClass';"><IMG src="emoticons/rose.gif"></TD>
<TD class="Emoticon" onmouseover="this.className='emoHoverClass;'" title=(w) style="WIDTH: 20px" onclick="insEmoticon(this.title);" onmouseout="this.className='emoClass';"><IMG src="emoticons/wilted_rose.gif"></TD>
<TD class="Emoticon" onmouseover="this.className='emoHoverClass;'" title=(p) style="WIDTH: 20px" onclick="insEmoticon(this.title);" onmouseout="this.className='emoClass';"><IMG src="emoticons/camera.gif"></TD>
<TD class="Emoticon" onmouseover="this.className='emoHoverClass;'" title=(~) style="WIDTH: 20px" onclick="insEmoticon(this.title);" onmouseout="this.className='emoClass';"><IMG src="emoticons/film.gif"></TD>
<TD class="Emoticon" onmouseover="this.className='emoHoverClass;'" title=(@) style="WIDTH: 20px" onclick="insEmoticon(this.title);" onmouseout="this.className='emoClass';"><IMG src="emoticons/cat.gif"></TD>
<TD class="Emoticon" onmouseover="this.className='emoHoverClass;'" title=(&amp;) style="WIDTH: 20px" onclick="insEmoticon(this.title);" onmouseout="this.className='emoClass';"><IMG src="emoticons/dog.gif"></TD>
<TD class="Emoticon" onmouseover="this.className='emoHoverClass;'" title=(t) style="WIDTH: 20px" onclick="insEmoticon(this.title);" onmouseout="this.className='emoClass';"><IMG src="emoticons/phone.gif"></TD>
<TD class="Emoticon" onmouseover="this.className='emoHoverClass;'" title=(i) style="WIDTH: 20px" onclick="insEmoticon(this.title);" onmouseout="this.className='emoClass';"><IMG src="emoticons/lightbulb.gif"></TD></TR>
<TR>
<TD class="Emoticon" onmouseover="this.className='emoHoverClass;'" title=(8) style="WIDTH: 20px" onclick="insEmoticon(this.title);" onmouseout="this.className='emoClass';"><IMG src="emoticons/note.gif"></TD>
<TD class="Emoticon" onmouseover="this.className='emoHoverClass;'" title=(S) style="WIDTH: 20px" onclick="insEmoticon(this.title);" onmouseout="this.className='emoClass';"><IMG src="emoticons/moon.gif"></TD>
<TD class="Emoticon" onmouseover="this.className='emoHoverClass;'" title=(*) style="WIDTH: 20px" onclick="insEmoticon(this.title);" onmouseout="this.className='emoClass';"><IMG src="emoticons/star.gif"></TD>
<TD class="Emoticon" onmouseover="this.className='emoHoverClass;'" title=(e) style="WIDTH: 20px" onclick="insEmoticon(this.title);" onmouseout="this.className='emoClass';"><IMG src="emoticons/envelope.gif"></TD>
<TD class="Emoticon" onmouseover="this.className='emoHoverClass;'" title=(O) style="WIDTH: 20px" onclick="insEmoticon(this.title);" onmouseout="this.className='emoClass';"><IMG src="emoticons/clock.gif"></TD>
<TD class="Emoticon" onmouseover="this.className='emoHoverClass;'" title=(sn) style="WIDTH: 20px" onclick="insEmoticon(this.title);" onmouseout="this.className='emoClass';"><IMG src="emoticons/53_53.gif"></TD>
<TD class="Emoticon" onmouseover="this.className='emoHoverClass;'" title=(bah) style="WIDTH: 20px" onclick="insEmoticon(this.title);" onmouseout="this.className='emoClass';"><IMG src="emoticons/70_70.gif"></TD>
<TD class="Emoticon" onmouseover="this.className='emoHoverClass;'" title=(pl) style="WIDTH: 20px" onclick="insEmoticon(this.title);" onmouseout="this.className='emoClass';"><IMG src="emoticons/55_55.gif"></TD></TR>
<TR>
<TD class="Emoticon" onmouseover="this.className='emoHoverClass;'" title=(||) style="WIDTH: 20px" onclick="insEmoticon(this.title);" onmouseout="this.className='emoClass';"><IMG src="emoticons/56_56.gif"></TD>
<TD class="Emoticon" onmouseover="this.className='emoHoverClass;'" title=(pi) style="WIDTH: 20px" onclick="insEmoticon(this.title);" onmouseout="this.className='emoClass';"><IMG src="emoticons/57_57.gif"></TD>
<TD class="Emoticon" onmouseover="this.className='emoHoverClass;'" title=(so) style="WIDTH: 20px" onclick="insEmoticon(this.title);" onmouseout="this.className='emoClass';"><IMG src="emoticons/58_58.gif"></TD>
<TD class="Emoticon" onmouseover="this.className='emoHoverClass;'" title=(au) style="WIDTH: 20px" onclick="insEmoticon(this.title);" onmouseout="this.className='emoClass';"><IMG src="emoticons/59_59.gif"></TD>
<TD class="Emoticon" onmouseover="this.className='emoHoverClass;'" title=(ap) style="WIDTH: 20px" onclick="insEmoticon(this.title);" onmouseout="this.className='emoClass';"><IMG src="emoticons/60_60.gif"></TD>
<TD class="Emoticon" onmouseover="this.className='emoHoverClass;'" title=(um) style="WIDTH: 20px" onclick="insEmoticon(this.title);" onmouseout="this.className='emoClass';"><IMG src="emoticons/61_61.gif"></TD>
<TD class="Emoticon" onmouseover="this.className='emoHoverClass;'" title=(ip) style="WIDTH: 20px" onclick="insEmoticon(this.title);" onmouseout="this.className='emoClass';"><IMG src="emoticons/62_62.gif"></TD>
<TD class="Emoticon" onmouseover="this.className='emoHoverClass;'" title=(co) style="WIDTH: 20px" onclick="insEmoticon(this.title);" onmouseout="this.className='emoClass';"><IMG src="emoticons/63_63.gif"></TD></TR>
<TR>
<TD class="Emoticon" onmouseover="this.className='emoHoverClass;'" title=(mp) style="WIDTH: 20px" onclick="insEmoticon(this.title);" onmouseout="this.className='emoClass';"><IMG src="emoticons/64_64.gif"></TD>
<TD class="Emoticon" onmouseover="this.className='emoHoverClass;'" title=(st) style="WIDTH: 20px" onclick="insEmoticon(this.title);" onmouseout="this.className='emoClass';"><IMG src="emoticons/66_66.gif"></TD>
<TD class="Emoticon" onmouseover="this.className='emoHoverClass;'" title=(li) style="WIDTH: 20px" onclick="insEmoticon(this.title);" onmouseout="this.className='emoClass';"><IMG src="emoticons/73_73.gif"></TD>
<TD class="Emoticon" onmouseover="this.className='emoHoverClass;'" title=(mo) style="WIDTH: 20px" onclick="insEmoticon(this.title);" onmouseout="this.className='emoClass';"><IMG src="emoticons/69_69.gif"></TD>
<TD class="Emoticon">&nbsp;</TD>
<TD class="Emoticon">&nbsp;</TD>
<TD class="Emoticon">&nbsp;</TD>
<TD class="Emoticon">&nbsp;</TD></TR></TBODY></TABLE></div>

</body>
</html>
0
 
LVL 8

Accepted Solution

by:
Leo Eikelman earned 2000 total points
ID: 16552079
I can't really see anywhere where the chat room is gaining focus except this line:

<textarea onFocus="amIFocused=true;" style="font-family:Verdana, Arial, Helvetica, sans-serif;font-size:10px;font-weight:normal;" onBlur="amIFocused=false;" class="ChatInput" id="ChatBox" mode="txt" onKeyUp="if (event.keyCode == 13) sndChatMsg(); else {sndComp();this.focus();}" ></textarea>

Maybe when someone posts something for some reason the onKeyup events gets fired and it gains focus because the event.keyCode != 13.  What happens if you comment out the onKeyUp event?


Leo
0
 

Author Comment

by:John Account
ID: 16554521
leikelman, that didn't work.
Whenever someone is sending text to the chat room, the focus gets lost from other forms. Moreover, I tried it in internet explorer, and the same thing happens--it pulls focus away from other windows.

The reason I posted this question under Visual basic, was because I thought there would be a way to override this lost of focus by setting a property with either the Forms or the Browser control. Do you know a way to do this?
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Suggested Courses

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question