Jump to content

WilMead

Members
  • Posts

    2
  • Joined

  • Last visited

Everything posted by WilMead

  1. Are you sure about this snippit?name[inc++] = '<?php echo $row['name']; ?>';url[inc++] = '<?php echo $row['url']; ?>';inc is incremented twice so it doesn't track the relationship between name and url. Drop the ++ on the first use name[inc] = '<?php echo $row['name']; ?>';url[inc++] = '<?php echo $row['url']; ?>';Your final loop uses x as an index to your arrays, but the variable i is being manipulated by the loop itself. for (var i in name){document.getElementById('scrollboxtime').innerHTML = name[x] + "<br />" + url[x];Would work better codedfor (var i in name){document.getElementById('scrollboxtime').innerHTML = name + "<br />" + url;Hope this helps.
  2. Hi Wally, I'm not sure I fully understand your problem. Let me apologize up front if this is not what you need. Let me first describe what I think you have. It seems that you want to avoid showing duplicate holidays in the output. You would like to have the XML parser do it for you. Duplicates are identified using the Holiday and Day fields. If I'm right, this suggestion won't help you much. First, organize your loop so that it first creates a "duplicate test key"; I'll call that DTK Judging from the way you are constructing the output string, a "duplicate master list" would be easiest; I'll call that DML.Initialize your DML to empty for the start of each month's processing. Before adding to the output string and after loading up holy and soly... Construct DTK (DTK=holy+soly;). if DTK is a substring of DML skip the data if DTK is not a substring of DML, extend your output string AND append DTK to DML. This will strip duplicates from your XML input stream regardless of sort order.
×
×
  • Create New...