[thelist] Re: Adding diff search engines to one combo box.

.jeff jeff at members.evolt.org
Wed Nov 28 18:18:43 CST 2001


james,

><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
> From: MRC
>
> .jeff,
>
> > thank god ie6 doesn't support the non-standard
> > <bgsound> tag.
>
> If only it were so! But you probably have the "Play
> sounds in web pages" option unchecked in Internet
> Options -- I'm not sure what the factory default is.
><><><><><><><><><><><><><><><><><><><><><><><><><><><><><

factory default is checked, unfortunately.  thank god for that checkbox
though, i now remember unchecking it to save myself the hassle of someone
else's idea of ambience.  *never* assume the user wants to hear your
carefully crafted "sounds" while they surf your site.  they might be
listening to the tv in the background, the radio, a cd, a tape, an lp, an
8-track, or *gasp* an mp3.  it sorely sucks to have someone else interrupt
that voluntary stream of sound with something unexpected.

><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
> > nope, no childish wav files played in this house.
>
> Not just that it's a bgsound wav file, but that it seems
> intended to frighten newbies into thinking that their
> PCs have been infected with a virus -- a very senseless
> prank. This rates a zero for professionalism in my book.
><><><><><><><><><><><><><><><><><><><><><><><><><><><><><

in favor of giving it its just deserves, i'd rank it a -1 on
professionalism.  a zero is giving it way too much credit.

><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
> A bit of a soapbox admonition for those who might
> entertain following this example: think twice before
> letting your antagonism for a particular software
> company or for a particular piece of software spill
> over into an abuse of your audience. It ain't hip.
><><><><><><><><><><><><><><><><><><><><><><><><><><><><><

while that soapbox is out and warmed up, let me add to that by suggesting
that you think twice before referring to a browser or software manufacturer
by your favorite pet names:  internet exploiter/exploder, nutscrape,
micro$oft, etc.  it adds no value to the conversation and serves only to
give valid reason for others reading your message to  consider you less
professional.

<tip type="JavaScript" author=".jeff">

have a list of items and want to see if a value matches one of the list
elements?  one of these functions will handle it for you:

/*  case sensitive search  */
function ListFind(list, value)
{
  var returnValue = -1;
  var delimiter = ',';
  if(arguments.length == 3) delimiter = arguments[2];
  var list = list.split(delimiter);
  for(var i = 0; i < list.length; i++)
  {
    if(list[i] == value)
    {
      returnValue = i;
      break;
    }
  }
  return returnValue;
}

/*  case insensitive search  */
function ListFindNoCase(list, value)
{
  var returnValue = -1;
  var delimiter = ',';
  if(arguments.length == 3) delimiter = arguments[2];
  var list = list.split(delimiter);
  for(var i = 0; i < list.length; i++)
  {
    if(list[i].toLowerCase() == value.toLowerCase())
    {
      returnValue = i;
      break;
    }
  }
  return returnValue;
}

</tip>

thanks,

.jeff

http://evolt.org/
jeff at members.evolt.org
http://members.evolt.org/jeff/






More information about the thelist mailing list