<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2726.2500" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face="Courier New">Just to wrap up this discussion, I polished 
Bekim's code to "full workability" and am including it below.&nbsp; Rather than 
prescribing naming conventions for active fields (who wants all their active 
inputs to be called "field-XXX"?), I modified the routine to work off the 
nodeName and type, thusly:</FONT></DIV>
<DIV><FONT face="Courier New"></FONT>&nbsp;</DIV>
<DIV><FONT face="Courier New">&nbsp; function handleSelectStart(evt) 
{</FONT></DIV>
<DIV><FONT face="Courier New">&nbsp;&nbsp;&nbsp; evt = (evt) ? evt : 
(window.event) ? window.event : "";</FONT></DIV>
<DIV><FONT face="Courier New">&nbsp;&nbsp;&nbsp; if (evt) {</FONT></DIV>
<DIV><FONT face="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var inputType = 
evt.srcElement.type;</FONT></DIV>
<DIV><FONT face="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var inputNodeName = 
evt.srcElement.nodeName;</FONT></DIV>
<DIV><FONT face="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (inputNodeName 
== "INPUT") {</FONT></DIV>
<DIV><FONT face="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return 
true;</FONT></DIV>
<DIV><FONT face="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</FONT></DIV>
<DIV><FONT face="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (inputNodeName 
== "TEXTAREA") {</FONT></DIV>
<DIV><FONT face="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return 
true;</FONT></DIV>
<DIV><FONT face="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</FONT></DIV>
<DIV><FONT face="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (inputType == 
"undefined") {</FONT></DIV>
<DIV><FONT face="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return 
false;</FONT></DIV>
<DIV><FONT face="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</FONT></DIV>
<DIV><FONT face="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return 
false;</FONT></DIV>
<DIV><FONT face="Courier New">&nbsp;&nbsp;&nbsp; }</FONT></DIV>
<DIV><FONT face="Courier New">&nbsp; } // handleSelectStart()</FONT></DIV>
<DIV><FONT face="Courier New"></FONT>&nbsp;</DIV>
<DIV><FONT face="Courier New">&nbsp; document.onselectstart = 
handleSelectStart;</FONT></DIV>
<DIV><FONT face="Courier New"></FONT>&nbsp;</DIV>
<DIV><FONT face="Courier New">Note -- certain older versions of Netscape may 
have issues with the handler name, as they generally prefer all lower-case for 
such things.</FONT></DIV>
<DIV><FONT face="Courier New"></FONT>&nbsp;</DIV>
<DIV><FONT face="Courier New">Anyway, this method worked like a champ on the 
four or five browser types I had time to check.&nbsp; Thanks Bekim!</FONT></DIV>
<DIV><FONT face="Courier New"></FONT>&nbsp;</DIV>
<DIV><FONT face="Courier New">Now if only someone could explain to me why the 
various major browser-writing bodies didn't build this into their engines at the 
get-go, I'd be a happy man.</FONT></DIV>
<DIV><FONT face="Courier New"></FONT>&nbsp;</DIV>
<DIV><FONT face="Courier New">-- Dave Lovering</FONT></DIV>
<BLOCKQUOTE 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
  <DIV style="FONT: 10pt arial"><FONT face="Courier New" size=3>----- Original 
  Message ----- </FONT></DIV>
  <DIV style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><FONT 
  size=3><FONT face="Courier New"><B>From:</B> </FONT></FONT><A 
  title=trojani2000@hotmail.com href="mailto:trojani2000@hotmail.com"><FONT 
  face="Courier New" size=3>BEKIM BACAJ</FONT></A><FONT face="Courier New" 
  size=3> </FONT></DIV>
  <DIV style="FONT: 10pt arial"><FONT size=3><FONT face="Courier New"><B>To:</B> 
  </FONT></FONT><A title=javascript@LaTech.edu 
  href="mailto:javascript@LaTech.edu"><FONT face="Courier New" 
  size=3>javascript@LaTech.edu</FONT></A><FONT face="Courier New" size=3> 
  </FONT></DIV>
  <DIV style="FONT: 10pt arial"><FONT size=3><FONT 
  face="Courier New"><B>Sent:</B> Wednesday, July 16, 2003 11:12 
  AM</FONT></FONT></DIV>
  <DIV style="FONT: 10pt arial"><FONT size=3><FONT 
  face="Courier New"><B>Subject:</B> Re: [Javascript] peculiarity of 
  onselectstart/third</FONT></FONT></DIV>
  <DIV><FONT face="Courier New"><BR></FONT></DIV>
  <DIV>
  <DIV>
  <DIV><FONT face="Courier New"></FONT></DIV><FONT face="Courier New">Well, you 
  owe me this one! </FONT></DIV>
  <DIV><FONT face="Courier New"></FONT></DIV>
  <DIV><FONT face="Courier New"></FONT></DIV><FONT face="Courier New">the 
  onselectstart turned false disables all the content from being </FONT>
  <DIV></DIV><FONT face="Courier New">selected, no matter what you do after this 
  will not help so wei will </FONT>
  <DIV></DIV><FONT face="Courier New">filter unwanted items like this: </FONT>
  <DIV></DIV>
  <DIV><FONT face="Courier New"></FONT></DIV>
  <DIV><FONT face="Courier New"></FONT></DIV>
  <DIV><FONT face="Courier New"></FONT></DIV>
  <DIV><FONT face="Courier New"></FONT></DIV>
  <SCRIPT language=JavaScript>
</DIV>>      <!--
</DIV>>
</DIV>>function filterSelectability(){
</DIV>>                var inptName=event.srcElement.name;
</DIV>>//Headache! - suppressing error for "undefined" elements
</DIV>>        if (typeof(inptName) == "undefined"){return false}
</DIV>>//making this compare 'true' for all elements named 'field' no 
</DIV>>matter the number- helpfull enough!
</DIV>>                var fld=inptName.substring(0,5);
</DIV>>        if(fld=='field'){return true}
</DIV>>                    else{return false}
</DIV>>                }
</DIV>>        document.onselectstart = filterSelectability;
</DIV>>      // -->
</DIV>>      </SCRIPT>

  <DIV><FONT face="Courier New"></FONT></DIV>
  <DIV><FONT face="Courier New"></FONT></DIV>
  <DIV><FONT face="Courier New"></FONT></DIV>
  <DIV><FONT face="Courier New"></FONT></DIV>
  <P><FONT face="Courier New">&lt;HTML&gt;<BR>&nbsp;&nbsp;&nbsp; 
  &lt;HEAD&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;TITLE&gt; Trojani 
  &lt;/TITLE&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;script 
  language='JavaScript'&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;!--</FONT></P>
  <P><FONT face="Courier New">function filterSelectability(){<BR>&nbsp;&nbsp;var 
  inptName=event.srcElement.name;<BR></FONT><FONT 
  face="Courier New"><EM>//Headache! - suppressing error for "undefined" 
  elements <BR></EM>&nbsp;if (typeof(inptName) == "undefined"){return 
  false}<BR>&nbsp;&nbsp;var 
  fld=inptName.substring(0,5);<BR>&nbsp;if(fld=='field'){return 
  true}<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; else{return 
  false}<BR>&nbsp;&nbsp;}<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  document.onselectstart = 
  filterSelectability;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // 
  --&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/script&gt;<BR>&nbsp;&nbsp;&nbsp; 
  &lt;/head&gt;<BR>&nbsp;&nbsp;&nbsp; &lt;body&gt;</FONT></P>
  <P><FONT face="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;form 
  name='myBogusForm' 
  action='javascript:void(null)'&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  &lt;center&gt;</FONT></P>
  <P><FONT 
  face="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  &lt;input name='field1' type='text' value='' size=30 
  &gt;&lt;br&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  &lt;input name='field2' type='text' value='' size=30 &gt;&lt;br&gt;</FONT></P>
  <P><FONT face="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  &lt;/center&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/form&gt;</FONT></P>
  <P><FONT face="Courier New">&nbsp;&nbsp;&nbsp; 
  &lt;/body&gt;<BR>&lt;/html&gt;<BR>&nbsp;</FONT></P><FONT 
  face="Courier New">Had some hard time with undefined items but it is solved 
  now, </FONT>
  <DIV></DIV><FONT face="Courier New">Cheers! </FONT>
  <DIV></DIV>
  <DIV><FONT face="Courier New"></FONT></DIV>
  <DIV><FONT face="Courier New"></FONT>&nbsp;</DIV></DIV><BR clear=all><FONT 
  face="Courier New">
  <HR>
  Protect your PC - </FONT><A href="http://g.msn.com/8HMHEN/2755??PS="><FONT 
  face="Courier New">Click here</FONT></A><FONT face="Courier New"> for 
  McAfee.com VirusScan Online </FONT>
  <P></P><FONT face="Courier New">
  <HR>
  </FONT>
  <P></P><FONT 
  face="Courier New">_______________________________________________<BR>Javascript 
  mailing 
  list<BR>Javascript@LaTech.edu<BR>https://lists.LaTech.edu/mailman/listinfo/javascript<BR></FONT></BLOCKQUOTE></BODY></HTML>