<?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xml:base="https://www.webmaster-forums.net/crss/node/1012129" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title></title>
    <link>https://www.webmaster-forums.net/crss/node/1012129</link>
    <description></description>
    <language>en</language>
          <item>
    <title></title>
    <link>https://www.webmaster-forums.net/html-css-and-javascript/wanting-improve-javascript-page#comment-1070445</link>
    <description> &lt;p&gt;Hi Vinny,&lt;/p&gt;
&lt;p&gt;I left the script on the not.shtml page so that hopefully people would not be able to figure out the names and addresses of my real page. (The one with the real scout names and addresses on it.)&lt;/p&gt;
&lt;p&gt;On the other page that I update regularly I will put it in a js file.&lt;/p&gt;
&lt;p&gt;Now for the learning part. Would you be so kind as to explain what the functions do? Also how would I modify the script so that the js file can be used for the merit badge list? Would I just make a fillMerit function and a fillSel for the Merit badge list? Do I need to make a field similar to street.value = recScout[1]; but that reads street.value = recMerit[1]?&lt;/p&gt;
&lt;p&gt;If I could understand how this all works I could add another page that I have been wanting to add that shows what a scout has left for their next advancement.&lt;/p&gt;
&lt;p&gt;As for the Philippians reference.&lt;/p&gt;
&lt;p&gt;Philippians 4:8,9&lt;/p&gt;
&lt;p&gt;Finally, brothers, whatever is true, whatever is noble, whatever is right, whatever is pure, whatever is lovely, whatever is admirable-if anything is excellent or praiseworthy-think about such things. Whatever you have learned or received or heard from me, or seen in me- put it into practice. And the God of peace will be with you.&lt;/p&gt;
&lt;p&gt;This verse is good even if you don&#039;t believe in God. If everyone would stop thinking about things that are bad, (murder, rape, stealing) think how much nicer the world would be to live in.&lt;/p&gt;
&lt;p&gt;Philippians 4:20&lt;/p&gt;
&lt;p&gt;To our God and Father be glory forever and ever. Amen&lt;/p&gt;
&lt;p&gt;Thanks again for your help. Someday maybe I will be able to help you out.&lt;/p&gt;
 </description>
     <pubDate>Wed, 30 Aug 2000 17:04:00 +0000</pubDate>
 <dc:creator>Jim Shilt</dc:creator>
 <guid isPermaLink="false">comment 1070445 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/html-css-and-javascript/wanting-improve-javascript-page#comment-1070442</link>
    <description> &lt;p&gt;Hi Jim,&lt;/p&gt;
&lt;p&gt;   You&#039;re welcome, glad it filled the bill, and speaking of the bill -- it&#039;s in the snail mail; it should get to you by the time my kid hits my age. &lt;img src=&quot;https://www.webmaster-forums.net/misc/smileys/smile.png&quot; title=&quot;Smiling&quot; alt=&quot;Smiling&quot; class=&quot;smiley-content&quot; /&gt;   &lt;/p&gt;
&lt;p&gt;   I also noticed you placed everything into the HTML page rather than a js file. Personally, I would keep it, make a few changes on the function and array names, and use the same scoutData.js file for all the dbms pages in the site (troop214 and merit).&lt;/p&gt;
&lt;p&gt;   Only change I would make now is the following line:&lt;/p&gt;
&lt;p&gt;    this:&lt;br /&gt;
    newItem = i * 10;&lt;/p&gt;
&lt;p&gt;    should be:&lt;br /&gt;
    newItem = i * scoutRecLength;&lt;/p&gt;
&lt;p&gt;   That&#039;s why this line is there:&lt;br /&gt;
   var scoutRecLength = 10;&lt;/p&gt;
&lt;p&gt;   If you ever decide to add some more information (next of kin, number of awards, etc.), you will only have to change the var (and the new field to the scout&#039;s record).  You won&#039;t have to scratch your head wondering why &quot;i * 10&quot;; you won&#039;t even have to search for it.&lt;/p&gt;
&lt;p&gt;   BTW: not having a bible nearby, what are your &amp;amp; Max&#039;s philippian verses? &lt;/p&gt;
&lt;p&gt;Vinny&lt;/p&gt;
 </description>
     <pubDate>Wed, 30 Aug 2000 14:57:52 +0000</pubDate>
 <dc:creator>Vincent Puglia</dc:creator>
 <guid isPermaLink="false">comment 1070442 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/html-css-and-javascript/wanting-improve-javascript-page#comment-1070439</link>
    <description> &lt;p&gt;THANKS THANKS THANKS&lt;/p&gt;
&lt;p&gt;Shouts of joy above for Vinny.&lt;/p&gt;
&lt;p&gt;I got the script to work. Thank you for all your hard work. I ended up taking out the sort function. With the names and addresses on the same line it is easy to sort manually and I wanted to sort on last names. It is amazing how much shorter the script is when you use arrays. I am going to have to learn how to use them&lt;/p&gt;
&lt;p&gt;Again thanks.&lt;/p&gt;
 </description>
     <pubDate>Wed, 30 Aug 2000 13:43:41 +0000</pubDate>
 <dc:creator>Jim Shilt</dc:creator>
 <guid isPermaLink="false">comment 1070439 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/html-css-and-javascript/wanting-improve-javascript-page#comment-1070423</link>
    <description> &lt;p&gt;Sorry Jim,&lt;/p&gt;
&lt;p&gt;  Forgot to tell you I changed some of the element names as well.&lt;/p&gt;
&lt;p&gt;Also: the fillScouts(blahablah) call should be on one line. That is, this:&lt;/p&gt;
&lt;p&gt;fillScouts(&quot;---- Select ----|Street Address|City/Town|ST|Zip|Phone|Rank|Patrol|Leadership position|E-mail address|fileID&quot;); &lt;/p&gt;
&lt;p&gt;should be 1 line, not 3. Because for all intents and purposes, it is passing a string. And strings must be on one line.&lt;/p&gt;
&lt;p&gt;Finally, the only function I have in the html page (besides GateKeeper) is:&lt;br /&gt;
function new_window(url) {&lt;/p&gt;
&lt;p&gt;I killed all the old code for the arrays (function choice(), etc).&lt;/p&gt;
&lt;p&gt;Hope this fixes it&lt;br /&gt;
Vinny&lt;/p&gt;
 </description>
     <pubDate>Wed, 30 Aug 2000 07:18:09 +0000</pubDate>
 <dc:creator>Vincent Puglia</dc:creator>
 <guid isPermaLink="false">comment 1070423 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/html-css-and-javascript/wanting-improve-javascript-page#comment-1070413</link>
    <description> &lt;p&gt;Hi Vinny,&lt;/p&gt;
&lt;p&gt;I tried to make the changes. I didn&#039;t get it right. Would you look at &lt;a href=&quot;http://www.shoutingrock.org/troop214/not.shtml&quot; class=&quot;bb-url&quot;&gt;http://www.shoutingrock.org/troop214/not.shtml&lt;/a&gt; and see what I missed?&lt;/p&gt;
&lt;p&gt;Thanks again.&lt;/p&gt;
 </description>
     <pubDate>Wed, 30 Aug 2000 03:46:31 +0000</pubDate>
 <dc:creator>Jim Shilt</dc:creator>
 <guid isPermaLink="false">comment 1070413 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/html-css-and-javascript/wanting-improve-javascript-page#comment-1070251</link>
    <description> &lt;p&gt;Hi Jim,&lt;/p&gt;
&lt;p&gt;  I moved all of the form-related functions to a js file (which gets included in the html).  Just cut&amp;amp;paste the scoutData.js info as is into an empty file and name the file.&lt;/p&gt;
&lt;p&gt;   You need to make 4 changes to the html file (noted below)&lt;br /&gt;
New scouts are added with the fillScout function. follow the template. You don&#039;t have to put them in any order, the scoutSort will alphabetize them.  &lt;/p&gt;
&lt;p&gt;  You might want to kill the fileID cell -- it&#039;s not used -- if you do change the scoutRecLength var to 10.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;changes to the html page&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;1) &amp;lt;script language=&#039;javascript&#039; src=&#039;scoutData.js&#039;&amp;gt;&amp;lt;/script&amp;gt;&lt;/p&gt;
&lt;p&gt;2) &lt;/p&gt;
&lt;p&gt;3)&lt;br /&gt;
   &amp;lt;script language=&quot;javascript&quot;&amp;gt;&lt;/p&gt;
&lt;p&gt;   &amp;lt;/script&amp;gt;&lt;/p&gt;
&lt;p&gt;4) kill all value references in the input text tags (the onLoad=disp loads the initial data)&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;contents of scoutData.js&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;var scoutRecLength = 11;&lt;br /&gt;
var scouts = new Array();&lt;/p&gt;
&lt;p&gt;fillScouts(&quot;---- Select ----|Street Address|City/Town|ST|Zip|Phone|Rank|Patrol|Leadership position|E-mail address|fileID&quot;);&lt;br /&gt;
fillScouts(&quot;Zzzzzz|9999 Coleman Way|Woodbadge|MA|11111|(800)got-rope|Tenderfoot|Scorpions|Patrol Leader|youbettcha@minisota.net|2&quot;);&lt;br /&gt;
fillScouts(&quot;Erik Eagle|111 Eureka Drive|Roundtable|PA|99999|(800)got-fire|Eagle|Turkey|Bugler|howdyall@lonestar.tex|3&quot;);&lt;br /&gt;
fillScouts(&quot;Clinton|1600 Pennsylvania Avenue|Washington|DC|99999|(800)play-sax|Eagle|Turkey|Prez|triedhard@ss.gov|5&quot;);&lt;br /&gt;
fillScouts(&quot;Frankie First Class|123875415714513-a Long Hike Circle|Canyon Echo|ho|12321|(800)got-tent|First Class|Graduates|Chaplain Aide|dude@califor.nia|4&quot;);&lt;br /&gt;
fillScouts(&quot;Tommy Tenderfoot|123 Coleman Way|Woodbadge|MA|11111|(800)got-rope|Tenderfoot|Scorpions|Patrol Leader|youbettcha@minisota.net|2&quot;);&lt;/p&gt;
&lt;p&gt;function disp(selObj, formObj)&lt;br /&gt;
{&lt;br /&gt;
  var index = 0;&lt;br /&gt;
  var recScout = new Array();&lt;/p&gt;
&lt;p&gt;  for (i=0; i &amp;lt; selObj.length; i++)&lt;br /&gt;
    if (selObj.options[i].selected)&lt;br /&gt;
       index = selObj.options[i].value * scoutRecLength;&lt;/p&gt;
&lt;p&gt;  for (i = 0; i &amp;lt; scoutRecLength; i++, index++)&lt;br /&gt;
    recScout[i] = scouts
&lt;ol&gt;
&lt;/ol&gt;
&lt;/p&gt;&lt;p&gt;;&lt;/p&gt;
&lt;p&gt;  with (formObj)&lt;br /&gt;
  {&lt;br /&gt;
    street.value = recScout[1];&lt;br /&gt;
    town.value = recScout[2];&lt;br /&gt;
    state.value = recScout[3];&lt;br /&gt;
    zipCode.value = recScout[4];&lt;br /&gt;
    phone.value = recScout[5];&lt;br /&gt;
    rank.value = recScout[6];&lt;br /&gt;
    patrol.value = recScout[7];&lt;br /&gt;
    leader.value = recScout[8];&lt;br /&gt;
    email.value = recScout[9];&lt;br /&gt;
  }&lt;br /&gt;
}&lt;/p&gt;
&lt;p&gt;function fillScouts(str)&lt;br /&gt;
{&lt;br /&gt;
  var index = scouts.length;&lt;br /&gt;
  tmpArray = str.split(&quot;|&quot;);&lt;br /&gt;
  for (i = 0; i &amp;lt; tmpArray.length; i++)&lt;br /&gt;
    scouts[index++] = tmpArray[i];&lt;br /&gt;
}&lt;/p&gt;
&lt;p&gt;function fillSel()&lt;br /&gt;
{&lt;br /&gt;
   scoutSort();&lt;br /&gt;
   var len = scouts.length / 11;&lt;br /&gt;
   document.write(&quot;&quot;)&lt;br /&gt;
   for (i = 0; i &amp;lt; len; i++)&lt;br /&gt;
   {&lt;br /&gt;
     newItem = i*11;&lt;br /&gt;
     document.write(&quot;&quot; + scouts[newItem] + &quot;&quot;);&lt;br /&gt;
   }&lt;br /&gt;
   document.write(&quot;&quot;);&lt;br /&gt;
}&lt;/p&gt;
&lt;p&gt;function scoutSort()&lt;br /&gt;
{&lt;br /&gt;
  var len = scouts.length / 11;&lt;br /&gt;
  var i = j = k = org = offset = 0;&lt;/p&gt;
&lt;p&gt;  for (i = 1; i &amp;lt; len; i++)&lt;br /&gt;
  {&lt;br /&gt;
    org = i * 11;&lt;br /&gt;
    if (org &amp;lt; scouts.length)&lt;br /&gt;
    {&lt;br /&gt;
      for ( j = 1; j &amp;lt; len ; j++)&lt;br /&gt;
      {&lt;br /&gt;
         offset = j*11;&lt;br /&gt;
         if ( scouts[offset] &amp;gt; scouts[org] )&lt;br /&gt;
         {&lt;br /&gt;
            for (k = 0; k &amp;lt; scoutRecLength; k++)&lt;br /&gt;
            {&lt;br /&gt;
               tmp = scouts[offset];&lt;br /&gt;
               scouts[offset++] = scouts[org];&lt;br /&gt;
               scouts[org++] = tmp;&lt;br /&gt;
            }&lt;br /&gt;
            j--;&lt;br /&gt;
         }&lt;br /&gt;
       }&lt;br /&gt;
     }&lt;br /&gt;
   }&lt;br /&gt;
}&lt;/p&gt;
&lt;p&gt;if you need anything, let me know&lt;br /&gt;
Vinny&lt;/p&gt;
 </description>
     <pubDate>Sat, 26 Aug 2000 17:19:33 +0000</pubDate>
 <dc:creator>Vincent Puglia</dc:creator>
 <guid isPermaLink="false">comment 1070251 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/html-css-and-javascript/wanting-improve-javascript-page#comment-1070165</link>
    <description> &lt;p&gt;Jim-&lt;br /&gt;
You have a good life goal.&lt;br /&gt;
Philippians 4:20!&lt;/p&gt;
 </description>
     <pubDate>Fri, 25 Aug 2000 18:26:34 +0000</pubDate>
 <dc:creator>Mark Hensler</dc:creator>
 <guid isPermaLink="false">comment 1070165 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/html-css-and-javascript/wanting-improve-javascript-page#comment-1070143</link>
    <description> &lt;p&gt;Hi Vinny,&lt;/p&gt;
&lt;p&gt;Thanks for saying the site looks better. &lt;img src=&quot;https://www.webmaster-forums.net/misc/smileys/smile.png&quot; title=&quot;Smiling&quot; alt=&quot;Smiling&quot; class=&quot;smiley-content&quot; /&gt;&lt;/p&gt;
&lt;p&gt;As far as the list. The scout gives me a slip filled out with the information and parent approval to put it on the site. I add the info using notepad. So I already know everything about the scout. I just want a better way to add the names and keep them in alpha order by scout name.&lt;/p&gt;
&lt;p&gt;Thanks again&lt;/p&gt;
 </description>
     <pubDate>Fri, 25 Aug 2000 13:43:33 +0000</pubDate>
 <dc:creator>Jim Shilt</dc:creator>
 <guid isPermaLink="false">comment 1070143 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/html-css-and-javascript/wanting-improve-javascript-page#comment-1070111</link>
    <description> &lt;p&gt;Hi Jim,&lt;/p&gt;
&lt;p&gt;   Try keeping me away &lt;img src=&quot;https://www.webmaster-forums.net/misc/smileys/smile.png&quot; title=&quot;Smiling&quot; alt=&quot;Smiling&quot; class=&quot;smiley-content&quot; /&gt;  I&#039;ll have something for you tomorrow. (had to send one of the kids off to school today, so a bit tired.)&lt;br /&gt;
   Another question though: you want to simply sort a predefined list of scouts? Or, do that &amp;amp; submit new scout info to yourself or a dbms?&lt;/p&gt;
&lt;p&gt;  Vinny&lt;/p&gt;
&lt;p&gt;BTW: the site looks a lot better than the last time I saw it -- around when you were putting up the calendar, right?&lt;/p&gt;
 </description>
     <pubDate>Fri, 25 Aug 2000 03:10:41 +0000</pubDate>
 <dc:creator>Vincent Puglia</dc:creator>
 <guid isPermaLink="false">comment 1070111 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/html-css-and-javascript/wanting-improve-javascript-page#comment-1069972</link>
    <description> &lt;p&gt;Hi Vincent,&lt;/p&gt;
&lt;p&gt;I was kind of hoping you would answer this one. &lt;/p&gt;
&lt;p&gt;As for your first question. We have scouts come into the troop every year and some boys only add their names when they get a computer. Also some boys leave. I really wanted to make it easier for me to add boys and keep the names in alpha order.&lt;/p&gt;
&lt;p&gt;In response to your second statement. I&#039;m not smart enough to understand the sort without seeing a working script. I am a script modifier &lt;img src=&quot;https://www.webmaster-forums.net/misc/smileys/sad.png&quot; title=&quot;Sad&quot; alt=&quot;Sad&quot; class=&quot;smiley-content&quot; /&gt;&lt;/p&gt;
&lt;p&gt;Thanks for your future help.&lt;/p&gt;
 </description>
     <pubDate>Wed, 23 Aug 2000 16:50:32 +0000</pubDate>
 <dc:creator>Jim Shilt</dc:creator>
 <guid isPermaLink="false">comment 1069972 at https://www.webmaster-forums.net</guid>
  </item>
  </channel>
</rss>
