Can you optimize this script?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Chris Martin

    Can you optimize this script?

    Background: Our main menu is built using a simple unordered list
    containing other ULs. There is a table on a page that holds the subnav.
    Because of certain circumstances, I need to build the subnav dynamically
    on each page. I wrote this script in about 15 minutes because it was a
    "scope-creep" kinda thing. Now that I have a bit of time, for education
    reasons, I want to optimize this thing as much as possible.

    Notes: DOM is a heaven send :). By my own admission, the variable names
    could be a little more descriptive. "nav" is the master navigation.
    "subNav" is a table row which holds the sub-navigation. This script works
    good enough. But, I'm always interested in the opinions of those more
    experienced than I.

    Here's a shortened version of the main nav:

    <ul id="nav">
    <li>
    <div>
    <a href="/home/newstory.aspx" alt="">Home</a>
    </div>
    </li>
    <li>
    <div>
    <a href="/about/default.aspx" alt="ABOUT ASBA">About Asba
    </a>
    </div>
    <ul>
    <li>
    <a href="/about/missionvisionph ilosophy.aspx">
    Mission/Vision/Philosophy</a>
    </li>
    <li>
    <a href="/about/board.aspx">Boa rd of Directors</a>
    </li>
    </ul>
    </li>
    </ul>

    Here's the subnav:

    <table class="subnav" border="0">
    <tr>
    <td class="subparen t" id="subNavHeade r">Benefits</td>
    <td width="15" rowspan="2">&nb sp;</td>

    </tr>
    <tr>
    <td class="subbody" id="subNav">

    </td>
    </tr>
    </table>

    Here's the script:

    function makeSubNav(){
    var navs = document.getEle mentById('nav') .getElementsByT agName('a');

    var subNav = document.getEle mentById('subNa v');
    var path = formatPath( document.locati on.pathname );
    var anchor, link, parentNodeName, listToPass, altText;
    for(var i = 0; i < navs.length; i++){
    anchor = navs[i];
    link = formatPath( anchor.pathname );
    listToPass = null;
    if(path == link){
    switch(anchor.p arentNode.nodeN ame.toUpperCase ()){
    case "LI":
    listToPass =
    anchor.parentNo de.parentNode.p arentNode;
    break;
    case "DIV":
    listToPass = anchor.parentNo de.parentNode;

    break;
    }
    break;
    }
    }
    try{
    altText = listToPass.getE lementsByTagNam e('div')
    [0].getElementsByT agName('a')[0].attributes.get NamedItem('alt' ).value;
    }catch(err){
    altText = '';
    }
    subNav.appendCh ild( createList(list ToPass, altText, path) );
    }

    function formatPath(path ){
    if(path.charAt( 0) != '/') path = '/' + path;
    return path.toLowerCas e();
    }

    function createList(ul, altText, currentPage){
    document.getEle mentById('subNa vHeader').inner HTML = altText;
    var toReturn = document.create Element('ul');
    var items = ul.getElementsB yTagName('li');
    var img, existingLink, existingPath, newItem, newLink, span;
    for(var i = 0; i < items.length; i++){
    existingLink = items[i].getElementsByT agName('a')[0];
    existingPath = formatPath( existingLink.pa thname );
    newItem = document.create Element('li');
    img = new Image();
    img.height = 6;
    img.width = 10;
    img.border = 0;
    img.src = "/Common/Images/LinkBullet.gif" ;
    newItem.appendC hild( img );
    if(existingPath == currentPage){
    toReturn.append Child( document.create Element('br') );
    newItem.classNa me = "subcurrent ";
    span = document.create Element('span') ;
    span.innerHTML = existingLink.in nerHTML;
    newItem.appendC hild( span );
    toReturn.append Child( newItem );
    toReturn.append Child( document.create Element('br') );
    }else{
    newLink = document.create Element('a');
    newLink.href = existingLink.hr ef;
    newLink.innerHT ML = existingLink.in nerHTML;
    newItem.appendC hild( newLink );
    toReturn.append Child( newItem );
    }
    }
    return toReturn;
    }

    TIA

    --
    ( )
    )\ ) ) ( /(
    (()/( ( /( ( ( ( )\())
    /(_)))\()))\ ( )\))( ((_)\
    (_)) (_))/((_) )\ ) ((_))\ _ ((_)
    / __|| |_ (_) _(_/( (()(_)| |/ /
    \__ \| _| | || ' \))/ _` | | ' <
    |___/ \__| |_||_||_| \__, | |_|\_\
    |___/
  • StingK

    #2
    Re: Can you optimize this script?

    Chris Martin <chris@design44 .com> wrote in
    news:Xns9573158 85B17ghetttobla stercoxnet@140. 99.99.130:
    [color=blue]
    > Background: Our main menu is built using a simple unordered list
    > containing other ULs. There is a table on a page that holds the
    > subnav. Because of certain circumstances, I need to build the subnav
    > dynamically on each page. I wrote this script in about 15 minutes
    > because it was a "scope-creep" kinda thing. Now that I have a bit of
    > time, for education reasons, I want to optimize this thing as much as
    > possible.
    >
    > Notes: DOM is a heaven send :). By my own admission, the variable
    > names could be a little more descriptive. "nav" is the master
    > navigation. "subNav" is a table row which holds the sub-navigation.
    > This script works good enough. But, I'm always interested in the
    > opinions of those more experienced than I.
    >
    > Here's a shortened version of the main nav:
    >
    > <ul id="nav">
    > <li>
    > <div>
    > <a href="/home/newstory.aspx" alt="">Home</a>
    > </div>
    > </li>
    > <li>
    > <div>
    > <a href="/about/default.aspx" alt="ABOUT ASBA">About
    > Asba
    > </a>
    > </div>
    > <ul>
    > <li>
    > <a href="/about/missionvisionph ilosophy.aspx">
    > Mission/Vision/Philosophy</a>
    > </li>
    > <li>
    > <a href="/about/board.aspx">Boa rd of Directors</a>
    > </li>
    > </ul>
    > </li>
    > </ul>
    >
    > Here's the subnav:
    >
    > <table class="subnav" border="0">
    > <tr>
    > <td class="subparen t" id="subNavHeade r">Benefits</td>
    > <td width="15" rowspan="2">&nb sp;</td>
    >
    > </tr>
    > <tr>
    > <td class="subbody" id="subNav">
    >
    > </td>
    > </tr>
    > </table>
    >
    > Here's the script:
    >
    > function makeSubNav(){
    > var navs =
    > document.getEle mentById('nav') .getElementsByT agName('a');
    >
    > var subNav = document.getEle mentById('subNa v');
    > var path = formatPath( document.locati on.pathname );
    > var anchor, link, parentNodeName, listToPass, altText;
    > for(var i = 0; i < navs.length; i++){
    > anchor = navs[i];
    > link = formatPath( anchor.pathname );
    > listToPass = null;
    > if(path == link){
    > switch(anchor.p arentNode.nodeN ame.toUpperCase ()){
    > case "LI":
    > listToPass =
    > anchor.parentNo de.parentNode.p arentNode;
    > break;
    > case "DIV":
    > listToPass = anchor.parentNo de.parentNode;
    >
    >
    > break;
    > }
    > break;
    > }
    > }
    > try{
    > altText = listToPass.getE lementsByTagNam e('div')
    > [0].getElementsByT agName('a')[0].attributes.get NamedItem('alt' ).value;
    > }catch(err){
    > altText = '';
    > }
    > subNav.appendCh ild( createList(list ToPass, altText, path) );
    > }
    >
    > function formatPath(path ){
    > if(path.charAt( 0) != '/') path = '/' + path;
    > return path.toLowerCas e();
    > }
    >
    > function createList(ul, altText, currentPage){
    > document.getEle mentById('subNa vHeader').inner HTML = altText;
    > var toReturn = document.create Element('ul');
    > var items = ul.getElementsB yTagName('li');
    > var img, existingLink, existingPath, newItem, newLink, span;
    > for(var i = 0; i < items.length; i++){
    > existingLink = items[i].getElementsByT agName('a')[0];
    > existingPath = formatPath( existingLink.pa thname );
    > newItem = document.create Element('li');
    > img = new Image();
    > img.height = 6;
    > img.width = 10;
    > img.border = 0;
    > img.src = "/Common/Images/LinkBullet.gif" ;
    > newItem.appendC hild( img );
    > if(existingPath == currentPage){
    > toReturn.append Child( document.create Element('br') );
    > newItem.classNa me = "subcurrent ";
    > span = document.create Element('span') ;
    > span.innerHTML = existingLink.in nerHTML;
    > newItem.appendC hild( span );
    > toReturn.append Child( newItem );
    > toReturn.append Child( document.create Element('br') );
    > }else{
    > newLink = document.create Element('a');
    > newLink.href = existingLink.hr ef;
    > newLink.innerHT ML = existingLink.in nerHTML;
    > newItem.appendC hild( newLink );
    > toReturn.append Child( newItem );
    > }
    > }
    > return toReturn;
    > }
    >
    > TIA
    >[/color]

    No Ideas?

    --
    ( )
    )\ ) ) ( /(
    (()/( ( /( ( ( ( )\())
    /(_)))\()))\ ( )\))( ((_)\
    (_)) (_))/((_) )\ ) ((_))\ _ ((_)
    / __|| |_ (_) _(_/( (()(_)| |/ /
    \__ \| _| | || ' \))/ _` | | ' <
    |___/ \__| |_||_||_| \__, | |_|\_\
    |___/

    Comment

    • Thomas 'PointedEars' Lahn

      #3
      Re: Can you optimize this script?

      StingK wrote:
      [color=blue]
      > Chris Martin <chris@design44 .com> wrote in
      > news:Xns9573158 85B17ghetttobla stercoxnet@140. 99.99.130:[/color]

      The name of the author of the precursor is sufficient to follow the
      discussion, while long attributions make them less legible. Please
      configure your UA not to post such attribution novels by default.
      [color=blue][color=green]
      >> <ul id="nav">
      >> <li>
      >> <div>
      >> <a href="/home/newstory.aspx" alt="">Home</a>[/color][/color]

      Whitespace like spaces and line-breaks are displayed as spaces. In a
      standards compliant DOM they count as text nodes. They should not occur
      after open tags and before close tags.

      An A element does not have an ALT attribute. Why should it, such only
      makes sense if the value of that attribute could be used as *alternative*
      display, as with images or other objects.
      [color=blue][color=green]
      >> </div>
      >> </li>[/color][/color]

      <ul id="nav">
      <li><div><a href="/home/newstory.aspx"> Home</a></div></li>
      [color=blue][color=green]
      >> <li>
      >> <div>
      >> <a href="/about/default.aspx" alt="ABOUT ASBA">About
      >> Asba
      >> </a>[/color][/color]

      The HTML 4.01 Specification recommends to avoid line-breaks within
      A elements.
      [color=blue][color=green]
      >> [...]
      >> Here's the subnav:
      >>
      >> <table class="subnav" border="0">[/color][/color]

      Tables should not serve layout purposes alone, instead they should
      only serve the purpose of arranging tabular data and to mark up the
      relations between them.
      [color=blue][color=green]
      >> function makeSubNav(){
      >> var navs =
      >> document.getEle mentById('nav') .getElementsByT agName('a');[/color][/color]

      Especially DOM methods should be feature-tested before applied, in
      its most simple form:

      if (document.getEl ementById)
      {
      var navs = document.getEle mentById('nav') ;
      if (navs.getElemen tsByTagName
      && (navs = navs.getElement sByTagName('a') ))
      {
      // access navs
      }

      More sophisticated but requires JavaScript 1.1 or an ECMAScript 2+
      language implementation:

      var t;
      if ((t = typeof document.getEle mentById) == "function"
      || (t == "object" && document.getEle mentById))
      {
      var navs = document.getEle mentById('nav') ;
      if (((t = typeof navs.getElement sByTagName) == "function"
      || (t == "object" && navs.getElement sByTagName))
      && (navs = navs.getElement sByTagName('a') ))
      {
      // access navs
      }

      See also <http://pointedears.de/scripts/test/whatami> and
      isMethodType() in <http://pointedears.de/scripts/types.js>.
      [color=blue][color=green]
      >> [...]
      >> var path = formatPath( document.locati on.pathname );[/color][/color]

      Although possible, at least I don't consider it good style
      if a method is called before its definition is known.

      formatPath() should be defined *in the source* prior to
      makeSubNav(), although it is defined during runtime before
      makeSubNav() is called and so calling the former is possible.
      [color=blue][color=green]
      >> var anchor, link, parentNodeName, listToPass, altText;[/color][/color]

      Those variables should be declared within the "for" loop, so that
      if the loop is for some reason not executed, they are not declared.
      [color=blue][color=green]
      >> for(var i = 0; i < navs.length; i++){[/color][/color]

      It is more efficient to write

      for (var i = 0, len = navs.length; i < len; i++)
      {
      [color=blue][color=green]
      >> anchor = navs[i];[/color][/color]

      That variable is indeed useful to prevent further unnecessary look-ups.
      [color=blue][color=green]
      >> link = formatPath( anchor.pathname );[/color][/color]

      However, that variable is not necessary, see [1]
      [color=blue][color=green]
      >> listToPass = null;[/color][/color]

      Could be omitted if [2] is used
      [color=blue][color=green]
      >> if(path == link){[/color][/color]

      [1]

      if (path == formatPath(anch or.pathname))
      [color=blue][color=green]
      >> switch(anchor.p arentNode.nodeN ame.toUpperCase ()){
      >> case "LI":
      >> listToPass =
      >> anchor.parentNo de.parentNode.p arentNode;
      >> break;
      >> case "DIV":
      >> listToPass = anchor.parentNo de.parentNode;
      >>
      >>
      >> break;
      >> }
      >> break;[/color][/color]

      Since `anchor.parentN ode' is accessed afterwards, look-ups can be saved
      here. toLowerCase() should be preferred over toUpperCase() for performance
      reasons (words are for the most part lowercase, and lowercase strings can
      be compressed better):

      for (...)
      {
      // ...
      var p = anchor.parentNo de;
      if (p)
      {
      switch (p.nodeName.toL owerCase())
      {
      case "li":
      listToPass = p.parentNode.pa rentNode;
      break;

      case "div":
      listToPass = p.parentNode;
      break;
      }
      break;
      }
      // ...
      }
      [color=blue][color=green]
      >> }
      >> try{
      >> altText = listToPass.getE lementsByTagNam e('div')
      >> [0].getElementsByT agName('a')[0].attributes.get NamedItem('alt' ).value;[/color][/color]

      altText = listToPass.getE lementsByTagNam e('div')[0]
      .getElementsByT agName('a')[0].alt;
      [color=blue][color=green]
      >> }catch(err){
      >> altText = '';
      >> }[/color][/color]

      Note that try...catch requires an ECMAScript 3 compliant language
      implementation.
      [color=blue][color=green]
      >> subNav.appendCh ild( createList(list ToPass, altText, path) );[/color][/color]

      [2]
      subNav.appendCh ild(createList( listToPass || null, altText, path));
      [color=blue][color=green]
      >> }
      >>
      >> function formatPath(path ){
      >> if(path.charAt( 0) != '/') path = '/' + path;
      >> return path.toLowerCas e();
      >> }[/color][/color]

      Are you sure? The path component of URIs is case-sensitive.
      [color=blue][color=green]
      >> function createList(ul, altText, currentPage){
      >> document.getEle mentById('subNa vHeader').inner HTML = altText;[/color][/color]

      `innerHTML' is not part of any standard, don't mix standards compliant
      references with proprietary ones (at least don't do that without
      feature-testing prior). Use either

      var o;
      if (document.getEl ementById
      && (o = document.getEle mentById('subNa vHeader'))
      && (typeof o.innerHTML != "undefined" ))
      {
      o.innerHTML = altText;
      }

      or

      var o;
      if (document.getEl ementById
      && (o = document.getEle mentById('subNa vHeader'))
      {
      var oSpan, oText;
      if (o.firstChild
      && o.removeChild
      && o.createTextNod e
      && (oText = o.createTextNod e(altText)))
      {
      while (o.firstChild)
      {
      o.removeChild(o .firstChild);
      }

      o.appendChild(o Text);
      }
      }

      or the latter with the more sophisticated feature-testing method,
      see above.
      [color=blue][color=green]
      >> var toReturn = document.create Element('ul');
      >> var items = ul.getElementsB yTagName('li');[/color][/color]

      At least

      if (ul)
      {
      // access ul
      }

      is necessary here, since `ul' can be `null'.
      [color=blue][color=green]
      >> var img, existingLink, existingPath, newItem, newLink, span;
      >> for(var i = 0; i < items.length; i++){[/color][/color]

      See above.
      [color=blue][color=green]
      >> existingLink = items[i].getElementsByT agName('a')[0];
      >> existingPath = formatPath( existingLink.pa thname );
      >> newItem = document.create Element('li');
      >> img = new Image();
      >> img.height = 6;
      >> img.width = 10;
      >> img.border = 0;
      >> img.src = "/Common/Images/LinkBullet.gif" ;[/color][/color]

      if (newItem)
      {
      [color=blue][color=green]
      >> newItem.appendC hild( img );
      >> if(existingPath == currentPage){
      >> toReturn.append Child( document.create Element('br') );[/color][/color]

      Don't. What if document.create Element('br') is for some reason
      unsuccessful?
      [color=blue][color=green]
      >> newItem.classNa me = "subcurrent ";
      >> span = document.create Element('span') ;
      >> span.innerHTML = existingLink.in nerHTML;[/color][/color]

      See above.
      [color=blue][color=green]
      >> [...]
      >> }[/color][/color]

      }
      [color=blue][color=green]
      >> }
      >> return toReturn;
      >> }[/color][/color]

      Indentation should not exceed 4 spaces. To keep
      source code legible, I recommend 2 spaces.
      [color=blue][color=green]
      >> TIA[/color][/color]

      You are welcome.
      [color=blue]
      > No Ideas?[/color]

      No name? No FAQ?


      PointedEars
      --
      The generation of random numbers is too important
      to be left to chance.
      -- Robert R. Coveyou, Oak Ridge National Laboratory

      Comment

      • John G Harris

        #4
        Re: Can you optimize this script?

        In article <1117970.KUJaDb DtBa@PointedEar s.de>, Thomas 'PointedEars'
        Lahn <PointedEars@we b.de> writes[color=blue]
        >StingK wrote:
        >[color=green]
        >> Chris Martin <chris@design44 .com> wrote in
        >> news:Xns9573158 85B17ghetttobla stercoxnet@140. 99.99.130:[/color]
        >
        >The name of the author of the precursor is sufficient to follow the
        >discussion, while long attributions make them less legible. Please
        >configure your UA not to post such attribution novels by default.[/color]
        <snip>

        The article ID identifies the message. The author's name often does not.

        John
        --
        John Harris

        Comment

        • Thomas 'PointedEars' Lahn

          #5
          Re: Can you optimize this script?

          John G Harris wrote:
          [color=blue]
          > In article <1117970.KUJaDb DtBa@PointedEar s.de>, Thomas 'PointedEars'
          > Lahn <PointedEars@we b.de> writes[color=green]
          >> StingK wrote:[color=darkred]
          >>> Chris Martin <chris@design44 .com> wrote in
          >>> news:Xns9573158 85B17ghetttobla stercoxnet@140. 99.99.130:[/color]
          >>
          >> The name of the author of the precursor is sufficient to follow the
          >> discussion, while long attributions make them less legible. Please
          >> configure your UA not to post such attribution novels by default.[/color]
          > <snip>
          >
          > The article ID identifies the message. The author's name often does not.[/color]

          The precursor's message ID is the last message ID in the References header
          of the followup. In a reasonable archive, at least this header will be
          stored to link the postings of the discussion in a thread; a good archive
          will provide all references as visible hyperlinks. There is exactly no
          need to duplicate that data in the body of the message, also taking into
          account that it in fact does not ease retrieval of the information
          contained therein, on the contrary.


          F'up2 PointedEars
          --
          For some reason, reading right through the entire quip list seemed a helluva
          lot more attractive than doing some FoxPro development... Can't imagine
          why! [www.rubberturnip.org.uk]

          Comment

          • Randy Webb

            #6
            Re: Can you optimize this script?

            Thomas 'PointedEars' Lahn wrote:[color=blue]
            > John G Harris wrote:
            >
            >[color=green]
            >>In article <1117970.KUJaDb DtBa@PointedEar s.de>, Thomas 'PointedEars'
            >>Lahn <PointedEars@we b.de> writes
            >>[color=darkred]
            >>>StingK wrote:
            >>>
            >>>>Chris Martin <chris@design44 .com> wrote in
            >>>>news:Xns957 315885B17ghettt oblastercoxnet@ 140.99.99.130:
            >>>
            >>>The name of the author of the precursor is sufficient to follow the
            >>>discussion , while long attributions make them less legible. Please
            >>>configure your UA not to post such attribution novels by default.[/color]
            >>
            >> <snip>
            >>
            >>The article ID identifies the message. The author's name often does not.[/color]
            >
            >
            > The precursor's message ID is the last message ID in the References header
            > of the followup. In a reasonable archive, at least this header will be
            > stored to link the postings of the discussion in a thread; a good archive
            > will provide all references as visible hyperlinks. There is exactly no
            > need to duplicate that data in the body of the message, also taking into
            > account that it in fact does not ease retrieval of the information
            > contained therein, on the contrary.[/color]

            Thats rubbish, and entirely irrelevant. You are assuming that headers
            are visible and available to anyone that uses News and that is not true.
            Learn the difference, stop babbling about attributions (which you fail
            to realize the importance of), and move on.
            [color=blue]
            > F'up2 PointedEars[/color]

            F'up set back where it should be. You are also assuming that the News
            software used by people follows and honors the Follow-up header. I know
            of one, that when used, is used by ~20% of web users that has neither
            the ability to set that Follow-up nor to cross-post.

            --
            Randy
            comp.lang.javas cript FAQ - http://jibbering.com/faq

            Comment

            • Dr John Stockton

              #7
              Re: Can you optimize this script?

              JRS: In article <1117970.KUJaDb DtBa@PointedEar s.de>, dated Sat, 16 Oct
              2004 16:58:33, seen in news:comp.lang. javascript, Thomas 'PointedEars'
              Lahn <PointedEars@we b.de> posted :[color=blue]
              >StingK wrote:
              >[color=green]
              >> Chris Martin <chris@design44 .com> wrote in
              >> news:Xns9573158 85B17ghetttobla stercoxnet@140. 99.99.130:[/color]
              >
              >The name of the author of the precursor is sufficient to follow the
              >discussion, while long attributions make them less legible. Please
              >configure your UA not to post such attribution novels by default.[/color]

              Ignore the child Lahn.

              He wishes to apply standards once considered appropriate in a minor
              local hierarchy, while ignoring all other recommendations including
              those of the relevant Usefor WIP.

              The attribution heading this article is Usefor-compliant, whereas that
              of StingK contains acceptable elements incorrectly formatted;

              In <Xns957315885B1 7ghetttoblaster coxnet@140.99.9 9.130>,
              Chris Martin <chris@design44 .com> wrote:

              is a correct way to present those elements. However, the date of the
              previous article is also generally considered useful. In the case of
              Lahn's article, it would have shown that he is once again answering an
              ancient article.


              Lahn could usefully have pointed out that the Usenet signature
              convention is to have no more than four lines.

              Lahn's own signatures are not Usenet-convention-compliant; they breach
              it in a different manner. Evidently he considers that RFC1855 does not
              apply to him.

              --
              © John Stockton, Surrey, UK. ?@merlyn.demon. co.uk Turnpike v4.00 MIME. ©
              Web <URL:http://www.merlyn.demo n.co.uk/> - FAQish topics, acronyms, & links.
              Proper <= 4-line sig. separator as above, a line exactly "-- " (SonOfRFC1036)
              Do not Mail News to me. Before a reply, quote with ">" or "> " (SonOfRFC1036)

              Comment

              • John G Harris

                #8
                Re: Can you optimize this script?

                In article <XuadnWYJBsRd O-zcRVn-sw@comcast.com> , Randy Webb
                <HikksNotAtHome @aol.com> writes[color=blue]
                >Thomas 'PointedEars' Lahn wrote:[/color]

                <snip>[color=blue][color=green]
                >> F'up2 PointedEars[/color]
                >
                >F'up set back where it should be. You are also assuming that the News
                >software used by people follows and honors the Follow-up header. I know
                >of one, that when used, is used by ~20% of web users that has neither
                >the ability to set that Follow-up nor to cross-post.[/color]

                Oh, so that's what F'up2 means. I thought it was describing Pointed
                Ears.

                John
                --
                John Harris

                Comment

                • Thomas 'PointedEars' Lahn

                  #9
                  Re: Can you optimize this script?

                  John G Harris wrote:
                  [color=blue]
                  > In article <XuadnWYJBsRd O-zcRVn-sw@comcast.com> , Randy Webb
                  > <HikksNotAtHome @aol.com> writes[color=green]
                  >> Thomas 'PointedEars' Lahn wrote:[color=darkred]
                  >>> F'up2 PointedEars[/color]
                  >>
                  >> F'up set back where it should be.[/color][/color]

                  It should be where it is on-topic which after my comment is certainly no
                  longer this newsgroup. I am not to blame about this further off-topic
                  discussion here, Randy; you are.
                  [color=blue][color=green]
                  >> You are also assuming that the News software used by people follows and
                  >> honors the Follow-up header. I know of one, that when used, is used by
                  >> ~20% of web users that has neither the ability to set that Follow-up nor
                  >> to cross-post.[/color]
                  >
                  > Oh, so that's what F'up2 means. I thought it was describing Pointed
                  > Ears.[/color]

                  FYI: My nickname does not contain a space character.

                  Followup-To: poster (F'up2 poster; here abbreviated as "F'up2 PointedEars")
                  means that the author of the message (here: me, thus the abbreviation)
                  wishes to continue the current discussion, if still necessary, only via
                  private e-mail (see RFC 1036), in most cases, as here, because further
                  discussion would be off-topic and thus disturb readers of the newsgroup.

                  It is a header value honored by all reasonable NetNews user agents but
                  broken Outlook Express which also sends the message to the newsgroup
                  if replied to such a message. It is _not_ up to the software of the
                  reader but up to the software of the poster of the message to *set* it.
                  People who reply are in most cases allowed by their software to post
                  to the newsgroup anyway (although that is not very polite, given the
                  reasons for setting Followup-To: poster above); it is not a must but
                  merely a suggestion, yet a strong one. It has nothing to do with
                  cross-posting, although the Followup-To header may be used also with
                  cross-postings to suggest the appropriate group where followups
                  (replies) should go to (to be on-topic).

                  People who use software that is not able to set Followup-To poster or to
                  post to more than one group should use different software, because their
                  current software is not compliant with widely accepted Internet and Usenet
                  standards (the RFC mentioned above, for example); however, I doubt that
                  such software exists -- even Google Groups allows for crossposting, not
                  yet for Followup-To: poster or to a newsgroup (which makes Google Groups
                  not a viable alternative for posting although good for read-only research,
                  and Google posters often killfiled, i.e. Google postings filtered; however,
                  they could cut the Newsgroups header to avoid further crosspostings;
                  however, as to my experience most people who use Google groups have no
                  clue about Google interconnecting with the world-wide distributed Usenet,
                  they consider it a Web bulletin board instead).

                  Those are facts that poor Randy still does not understand although they have
                  been already explained to him many times before, not only by me. Instead,
                  he is continuously expressing his unchanged sparkling incompetence in
                  matters of Usenet by whining about the bad bad people out there who know
                  how to choose working software, know how to handle that software and know
                  about the workings of the used communication medium; I suggest to ignore
                  that.

                  F'up2 poster set again, please follow. EOD for me here.


                  PointedEars
                  --
                  Auntie Em, hate you, hate Kansas, taking the dog. Dorothy.

                  Comment

                  • Randy Webb

                    #10
                    Re: Can you optimize this script?

                    Thomas 'PointedEars' Lahn wrote:[color=blue]
                    > John G Harris wrote:
                    >
                    >[color=green]
                    >>In article <XuadnWYJBsRd O-zcRVn-sw@comcast.com> , Randy Webb
                    >><HikksNotAtHo me@aol.com> writes
                    >>[color=darkred]
                    >>>Thomas 'PointedEars' Lahn wrote:
                    >>>
                    >>>>F'up2 PointedEars
                    >>>
                    >>>F'up set back where it should be.[/color][/color]
                    >
                    >
                    > It should be where it is on-topic which after my comment is certainly no
                    > longer this newsgroup. I am not to blame about this further off-topic
                    > discussion here, Randy; you are.
                    >[/color]

                    Yep. I accept it. I put it back in News: where it originated. The
                    problem with setting follow-up to you and you alone is two-fold:

                    1) You can not return the email so there wouldn't be much point in
                    emailing you to begin with.

                    2) If it becomes private, then you are limited to two opinions. That
                    would be mine and yours. Ask in News, Comment in News, get rebuked in
                    News. Its the way of News.
                    [color=blue]
                    >[color=green][color=darkred]
                    >>>You are also assuming that the News software used by people follows and
                    >>>honors the Follow-up header. I know of one, that when used, is used by
                    >>>~20% of web users that has neither the ability to set that Follow-up nor
                    >>>to cross-post.[/color]
                    >>
                    >>Oh, so that's what F'up2 means. I thought it was describing Pointed
                    >>Ears.[/color]
                    >
                    >
                    > FYI: My nickname does not contain a space character.[/color]

                    Either way, his assumption was a correct one.
                    [color=blue]
                    > Followup-To: poster (F'up2 poster; here abbreviated as "F'up2 PointedEars")
                    > means that the author of the message (here: me, thus the abbreviation)
                    > wishes to continue the current discussion, if still necessary, only via
                    > private e-mail (see RFC 1036), in most cases, as here, because further
                    > discussion would be off-topic and thus disturb readers of the newsgroup.[/color]

                    Oh, and this comes from a person who continuosly replies to post that
                    are over 3 weeks old? Wow. I am impressed.
                    [color=blue]
                    > It is a header value honored by all reasonable NetNews user agents but
                    > broken Outlook Express which also sends the message to the newsgroup
                    > if replied to such a message. It is _not_ up to the software of the
                    > reader but up to the software of the poster of the message to *set* it.[/color]

                    You are assuming, incorrectly, that all News software (other than OE)
                    allows it or even honors it. They do not. AOL's newsreader being one of
                    them. And considering the fact that you can *not* use an external reader
                    when reading News via AOL, it would be kind of hard to set follow-ups,
                    honor them, or even be allowed to see what they are. It doesn't give you
                    that option.
                    [color=blue]
                    > People who reply are in most cases allowed by their software to post
                    > to the newsgroup anyway (although that is not very polite, given the
                    > reasons for setting Followup-To: poster above); it is not a must but
                    > merely a suggestion, yet a strong one. It has nothing to do with
                    > cross-posting, although the Followup-To header may be used also with
                    > cross-postings to suggest the appropriate group where followups
                    > (replies) should go to (to be on-topic).[/color]

                    And I think its appropriate in comp.lang.javas cript. If you don't like
                    it, don't reply.
                    [color=blue]
                    > People who use software that is not able to set Followup-To poster or to
                    > post to more than one group should use different software, because their
                    > current software is not compliant with widely accepted Internet and Usenet
                    > standards (the RFC mentioned above, for example); however, I doubt that
                    > such software exists -- even Google Groups allows for crossposting, not
                    > yet for Followup-To: poster or to a newsgroup (which makes Google Groups
                    > not a viable alternative for posting although good for read-only research,
                    > and Google posters often killfiled, i.e. Google postings filtered; however,
                    > they could cut the Newsgroups header to avoid further crosspostings;
                    > however, as to my experience most people who use Google groups have no
                    > clue about Google interconnecting with the world-wide distributed Usenet,
                    > they consider it a Web bulletin board instead).[/color]

                    If you can tell me how to use an external reader when using AOL as the
                    ISP that doesn't allow it, you might have a point. Otherwise, you are
                    spinning your wheels, spouting garbage, and generally showing your lack
                    of intelligence about the web in general. It is not always up to the
                    user what software they are/aren't allowed to use based on the ISP.

                    [color=blue]
                    > Those are facts that poor Randy still does not understand although they have
                    > been already explained to him many times before, not only by me.[/color]

                    Now, you have done what you normally do. You are babbling nonsense about
                    whats been explained to me, by someone other than you. Well, sorry to
                    disappoint you but what you have to say to me has about as much value to
                    me as a salt block in a rain storm. But to give you the benefit of the
                    doubt, prove what you are saying by giving reference to News: articles
                    *under a year old* that prove what you are saying.
                    [color=blue]
                    > Instead, he is continuously expressing his unchanged sparkling incompetence in
                    > matters of Usenet by whining about the bad bad people out there who know
                    > how to choose working software, know how to handle that software and know
                    > about the workings of the used communication medium; I suggest to ignore
                    > that.[/color]

                    If you weren't so ludicrously stupid, you wouldn't be as funny.

                    [color=blue]
                    > F'up2 poster set again, please follow. EOD for me here.[/color]

                    I did, but I also posted it back where *I* wanted it posted. If you
                    can't handle a public discussion, then bow out.

                    --
                    Randy
                    comp.lang.javas cript FAQ - http://jibbering.com/faq

                    Comment

                    • John G Harris

                      #11
                      Re: Can you optimize this script?

                      In article <5177237.Kt65yX NLjT@PointedEar s.de>, Thomas 'PointedEars'
                      Lahn <PointedEars@we b.de> writes

                      <snip>[color=blue]
                      >F'up2 poster set again, please follow. EOD for me here.[/color]

                      Once again my eyes auto-expanded this to F***ed up duo, where duo is
                      presumably referring to a pair of auricular appendages with a
                      discontinuous outline.

                      John

                      PS Sensible people write "Follow up set".
                      --
                      John Harris

                      Comment

                      Working...