<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
  <channel>
    <title>'plz help with really simple task' Thread RSS Feed</title>
    <link>http://www.programmersheaven.com/</link>
    <description>Contains the latest posts from the thread 'plz help with really simple task' posted on the 'JavaScript' forum at Programmer's Heaven.</description>
    <language>en</language>
    <copyright>Copyright 2013 Programmers Heaven</copyright>
    <pubDate>Sat, 25 May 2013 00:57:25 -0700</pubDate>
    <lastBuildDate>Sat, 25 May 2013 00:57:25 -0700</lastBuildDate>
    <generator>Argotic Syndication Framework 2007.3.0.1, http://www.codeplex.com/Argotic</generator>
    <docs>http://www.rssboard.org/rss-specification</docs>
    <ttl>360</ttl>
    <image>
      <url>http://www.programmersheaven.com/images/ph.gif</url>
      <title>Programmers Heaven</title>
      <link>http://www.programmersheaven.com/</link>
      <width>88</width>
      <height>31</height>
    </image>
    <item>
      <title>plz help with really simple task</title>
      <link>http://www.programmersheaven.com/mb/java-script/334064/334064/plz-help-with-really-simple-task/</link>
      <description>could any1 with suger on top help me with this really simple assignment, im a total newb i know, but cant figure this out.&lt;br /&gt;
&lt;br /&gt;
" Display the days of the week (Monday, Tuesday, etc) starting with the rundate. Display them each in a different color, except Sunday is always red. "&lt;br /&gt;
&lt;br /&gt;
like i would need the list of 7 days like a vertical but somehow code it so where the days starts with current day. so run date would have to be first.&lt;br /&gt;
&lt;br /&gt;
so if today is say tuesday&lt;br /&gt;
&lt;br /&gt;
tuesday&lt;br /&gt;
wednesday etc.&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/java-script/334064/334064/plz-help-with-really-simple-task/</guid>
      <pubDate>Wed, 05 Apr 2006 23:19:19 -0700</pubDate>
      <category>JavaScript</category>
    </item>
    <item>
      <title>Re: plz help with really simple task</title>
      <link>http://www.programmersheaven.com/mb/java-script/334064/334089/re-plz-help-with-really-simple-task/#334089</link>
      <description>: could any1 with suger on top help me with this really simple assignment, im a total newb i know, but cant figure this out.&lt;br /&gt;
: &lt;br /&gt;
: " Display the days of the week (Monday, Tuesday, etc) starting with the rundate. Display them each in a different color, except Sunday is always red. "&lt;br /&gt;
: &lt;br /&gt;
: like i would need the list of 7 days like a vertical but somehow code it so where the days starts with current day. so run date would have to be first.&lt;br /&gt;
: &lt;br /&gt;
: so if today is say tuesday&lt;br /&gt;
: &lt;br /&gt;
: tuesday&lt;br /&gt;
: wednesday etc.&lt;br /&gt;
: &lt;br /&gt;
This might help: &lt;a href="http://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_date_weekday"&gt;http://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_date_w
eekday&lt;/a&gt;&lt;br /&gt;
To set the color, simply write the appropriate HTML-tag(s) along with the date.&lt;br /&gt;
The best option is to use a while do loop to write the other dates, where the array is circular. In other words if the day-index is larger than 6 make it 0.&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/java-script/334064/334089/re-plz-help-with-really-simple-task/#334089</guid>
      <pubDate>Thu, 06 Apr 2006 04:49:55 -0700</pubDate>
      <category>JavaScript</category>
    </item>
    <item>
      <title>Re: plz help with really simple task</title>
      <link>http://www.programmersheaven.com/mb/java-script/334064/334102/re-plz-help-with-really-simple-task/#334102</link>
      <description>thanks for the input, but this only show 1 day i need all the days of week on same page strating from current, iknow how to do color thing,but how do i loop the days of week starting with today? &lt;br /&gt;
: This might help: &lt;a href="http://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_date_weekday"&gt;http://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_date_w
eekday&lt;/a&gt;&lt;br /&gt;
: To set the color, simply write the appropriate HTML-tag(s) along with the date.&lt;br /&gt;
: The best option is to use a while do loop to write the other dates, where the array is circular. In other words if the day-index is larger than 6 make it 0.&lt;br /&gt;
: &lt;br /&gt;
&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/java-script/334064/334102/re-plz-help-with-really-simple-task/#334102</guid>
      <pubDate>Thu, 06 Apr 2006 09:43:31 -0700</pubDate>
      <category>JavaScript</category>
    </item>
    <item>
      <title>Re: plz help with really simple task</title>
      <link>http://www.programmersheaven.com/mb/java-script/334064/334103/re-plz-help-with-really-simple-task/#334103</link>
      <description>&lt;strong&gt;&lt;span style="color: Red;"&gt;This message was edited by john2kay at  2006-4-6 11:14:2&lt;/span&gt;&lt;/strong&gt;&lt;hr /&gt;&lt;br /&gt;
i think u may have suggested what i need with the circular loop strig but im not sure how to write that.&lt;br /&gt;
: The best option is to use a while do loop to write the other dates, where the array is circular. In other words if the day-index is larger than 6 make it 0.&lt;br /&gt;
: &lt;br /&gt;
&lt;br /&gt;
basically what im am rying to figure out is once it have current date ie:&lt;br /&gt;
&lt;br /&gt;
weekday[d.getDay()])&lt;br /&gt;
what is code for following weekday&lt;br /&gt;
and next&lt;br /&gt;
next&lt;br /&gt;
so on&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/java-script/334064/334103/re-plz-help-with-really-simple-task/#334103</guid>
      <pubDate>Thu, 06 Apr 2006 09:46:26 -0700</pubDate>
      <category>JavaScript</category>
    </item>
    <item>
      <title>Re: plz help with really simple task</title>
      <link>http://www.programmersheaven.com/mb/java-script/334064/334124/re-plz-help-with-really-simple-task/#334124</link>
      <description>: &lt;strong&gt;&lt;span style="color: Red;"&gt;This message was edited by john2kay at  2006-4-6 11:14:2&lt;/span&gt;&lt;/strong&gt;&lt;hr /&gt;&lt;br /&gt;
: i think u may have suggested what i need with the circular loop strig but im not sure how to write that.&lt;br /&gt;
: : The best option is to use a while do loop to write the other dates, where the array is circular. In other words if the day-index is larger than 6 make it 0.&lt;br /&gt;
: : &lt;br /&gt;
: &lt;br /&gt;
: basically what im am rying to figure out is once it have current date ie:&lt;br /&gt;
: &lt;br /&gt;
: weekday[d.getDay()])&lt;br /&gt;
: what is code for following weekday&lt;br /&gt;
: and next&lt;br /&gt;
: next&lt;br /&gt;
: so on&lt;br /&gt;
: &lt;br /&gt;
: &lt;br /&gt;
: &lt;br /&gt;
Here is an example of a while-loop: &lt;a href="http://www.w3schools.com/js/tryit.asp?filename=tryjs_while"&gt;http://www.w3schools.com/js/tryit.asp?filename=tryjs_while&lt;/a&gt;&lt;br /&gt;
This code can easily be modified to show all the dates.&lt;br /&gt;
&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/java-script/334064/334124/re-plz-help-with-really-simple-task/#334124</guid>
      <pubDate>Thu, 06 Apr 2006 15:01:51 -0700</pubDate>
      <category>JavaScript</category>
    </item>
    <item>
      <title>Re: plz help with really simple task</title>
      <link>http://www.programmersheaven.com/mb/java-script/334064/334129/re-plz-help-with-really-simple-task/#334129</link>
      <description>i tried this and it didnt work, what am i doing wrong? &lt;br /&gt;
&lt;br /&gt;
"&amp;lt;html&amp;gt;&lt;br /&gt;
&amp;lt;body&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;script type="text/javascript"&amp;gt;&lt;br /&gt;
&lt;br /&gt;
var d=new Date()&lt;br /&gt;
var weekday=new Array(7)&lt;br /&gt;
weekday[0]="Sunday"&lt;br /&gt;
weekday[1]="Monday"&lt;br /&gt;
weekday[2]="Tuesday"&lt;br /&gt;
weekday[3]="Wednesday"&lt;br /&gt;
weekday[4]="Thursday"&lt;br /&gt;
weekday[5]="Friday"&lt;br /&gt;
weekday[6]="Saturday"&lt;br /&gt;
i = weekday[d.getDay()]&lt;br /&gt;
while (i &amp;lt;= 7)&lt;br /&gt;
{&lt;br /&gt;
document.write("The day is " + i)&lt;br /&gt;
document.write("&amp;lt;br&amp;gt;")&lt;br /&gt;
i++&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/script&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/body&amp;gt;&lt;br /&gt;
&amp;lt;/html&amp;gt;&lt;br /&gt;
"&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/java-script/334064/334129/re-plz-help-with-really-simple-task/#334129</guid>
      <pubDate>Thu, 06 Apr 2006 15:36:12 -0700</pubDate>
      <category>JavaScript</category>
    </item>
    <item>
      <title>Re: plz help with really simple task</title>
      <link>http://www.programmersheaven.com/mb/java-script/334064/334131/re-plz-help-with-really-simple-task/#334131</link>
      <description>: i tried this and it didnt work, what am i doing wrong? &lt;br /&gt;
: &lt;br /&gt;
: "&amp;lt;html&amp;gt;&lt;br /&gt;
: &amp;lt;body&amp;gt;&lt;br /&gt;
: &lt;br /&gt;
: &amp;lt;script type="text/javascript"&amp;gt;&lt;br /&gt;
: &lt;br /&gt;
: var d=new Date()&lt;br /&gt;
: var weekday=new Array(7)&lt;br /&gt;
: weekday[0]="Sunday"&lt;br /&gt;
: weekday[1]="Monday"&lt;br /&gt;
: weekday[2]="Tuesday"&lt;br /&gt;
: weekday[3]="Wednesday"&lt;br /&gt;
: weekday[4]="Thursday"&lt;br /&gt;
: weekday[5]="Friday"&lt;br /&gt;
: weekday[6]="Saturday"&lt;br /&gt;
: i = weekday[d.getDay()]&lt;br /&gt;
: while (i &amp;lt;= 7)&lt;br /&gt;
: {&lt;br /&gt;
: document.write("The day is " + i)&lt;br /&gt;
: document.write("")&lt;br /&gt;
: i++&lt;br /&gt;
: }&lt;br /&gt;
: &amp;lt;/script&amp;gt;&lt;br /&gt;
: &lt;br /&gt;
: &lt;br /&gt;
: &amp;lt;/body&amp;gt;&lt;br /&gt;
: &amp;lt;/html&amp;gt;&lt;br /&gt;
: "&lt;br /&gt;
: &lt;br /&gt;
The variable i should be an integer, which points to the current day:&lt;br /&gt;
&lt;pre class="sourcecode"&gt;
  i = d.getDay();
  while (i &amp;lt;= 7 )
  {
    document.write("The day is " + weekday[i])
    i++
  }
&lt;/pre&gt;&lt;br /&gt;
This will show all the days from today till saturday. By checking if i is different from d.getDay(), and setting i back to 0 if it becomes 7, you can also show the weekdays before today.&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/java-script/334064/334131/re-plz-help-with-really-simple-task/#334131</guid>
      <pubDate>Thu, 06 Apr 2006 15:44:36 -0700</pubDate>
      <category>JavaScript</category>
    </item>
    <item>
      <title>Re: plz help with really simple task</title>
      <link>http://www.programmersheaven.com/mb/java-script/334064/334132/re-plz-help-with-really-simple-task/#334132</link>
      <description>&lt;strong&gt;&lt;span style="color: Red;"&gt;This message was edited by john2kay at  2006-4-6 15:59:52&lt;/span&gt;&lt;/strong&gt;&lt;hr /&gt;&lt;br /&gt;
ok i fied it up but now i get 1 line saying day i undefined???&lt;br /&gt;
&lt;br /&gt;
"&amp;lt;html&amp;gt;&lt;br /&gt;
&amp;lt;body&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;script type="text/javascript"&amp;gt;&lt;br /&gt;
&lt;br /&gt;
var d=new Date();&lt;br /&gt;
var weekday=new Array(7);&lt;br /&gt;
weekday[0]="Sunday";&lt;br /&gt;
weekday[1]="Monday";&lt;br /&gt;
weekday[2]="Tuesday";&lt;br /&gt;
weekday[3]="Wednesday";&lt;br /&gt;
weekday[4]="Thursday";&lt;br /&gt;
weekday[5]="Friday";&lt;br /&gt;
weekday[6]="Saturday";&lt;br /&gt;
i = weekday[d.getDay()];&lt;br /&gt;
while (i &amp;lt;= 7);&lt;br /&gt;
{&lt;br /&gt;
document.write("The day is " + weekday[i])&lt;br /&gt;
&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/script&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/body&amp;gt;&lt;br /&gt;
&amp;lt;/html&amp;gt;&lt;br /&gt;
"&lt;br /&gt;
&lt;br /&gt;
thx in advamce&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/java-script/334064/334132/re-plz-help-with-really-simple-task/#334132</guid>
      <pubDate>Thu, 06 Apr 2006 15:59:41 -0700</pubDate>
      <category>JavaScript</category>
    </item>
    <item>
      <title>Re: plz help with really simple task</title>
      <link>http://www.programmersheaven.com/mb/java-script/334064/334138/re-plz-help-with-really-simple-task/#334138</link>
      <description>ok i worked for a long time and i am at this point, only problem is colors are not as i defined them, red is supposed to be only red color.&lt;br /&gt;
&lt;br /&gt;
"&amp;lt;html&amp;gt;&amp;lt;title&amp;gt;Marks JS&amp;lt;/title&amp;gt;&lt;br /&gt;
&amp;lt;body&amp;gt; &amp;lt;font size = "4"&amp;gt;&lt;br /&gt;
&amp;lt;script language = "JavaScript"&amp;gt;&lt;br /&gt;
&amp;lt;!--Hide from non-Javascript browsers&lt;br /&gt;
var Today = new Date() ;&lt;br /&gt;
var DayNumber = Today.getDay() ;&lt;br /&gt;
&lt;br /&gt;
var Day;&lt;br /&gt;
var weekday=new Array(14);&lt;br /&gt;
weekday[0]="Sunday"; &lt;br /&gt;
weekday[1]="Monday"; &lt;br /&gt;
weekday[2]="Tuesday"; &lt;br /&gt;
weekday[3]="Wednesday"; &lt;br /&gt;
weekday[4]="Thursday"; &lt;br /&gt;
weekday[5]="Friday"; &lt;br /&gt;
weekday[6]="Saturday"; &lt;br /&gt;
weekday[7]="Sunday"; &lt;br /&gt;
weekday[8]="Monday"; &lt;br /&gt;
weekday[9]="Tuesday"; &lt;br /&gt;
weekday[10]="Wednesday"; &lt;br /&gt;
weekday[11]="Thursday"; &lt;br /&gt;
weekday[12]="Friday"; &lt;br /&gt;
weekday[13]="Saturday"; &lt;br /&gt;
var color=new Array(14);&lt;br /&gt;
color[0]="red"; &lt;br /&gt;
color[1]="blue"; &lt;br /&gt;
color[2]="green"; &lt;br /&gt;
color[3]="orange"; &lt;br /&gt;
color[4]="black"; &lt;br /&gt;
color[5]="yellow"; &lt;br /&gt;
color[6]="gray"; &lt;br /&gt;
color[7]="red"; &lt;br /&gt;
color[8]="Monday"; &lt;br /&gt;
color[9]="blue"; &lt;br /&gt;
color[10]="green"; &lt;br /&gt;
color[11]="orange"; &lt;br /&gt;
color[12]="black"; &lt;br /&gt;
color[13]="yellow"; &lt;br /&gt;
i = Today.getDay(); &lt;br /&gt;
for(i=0;i&amp;lt;7;i++)&lt;br /&gt;
{&lt;br /&gt;
DayNumber = Today.getDay() +i;&lt;br /&gt;
document.write("&amp;lt;font color = " + color[i] + " &amp;gt;"+"The day is " + weekday[DayNumber] + "&amp;lt;br/&amp;gt;&amp;lt;/font&amp;gt;") ;&lt;br /&gt;
}&lt;br /&gt;
 &lt;br /&gt;
//Stop hiding --&amp;gt;&lt;br /&gt;
&amp;lt;/script&amp;gt;&amp;lt;/font&amp;gt;&amp;lt;/table&amp;gt;&amp;lt;/body&amp;gt;&amp;lt;/html&amp;gt;"&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/java-script/334064/334138/re-plz-help-with-really-simple-task/#334138</guid>
      <pubDate>Thu, 06 Apr 2006 17:25:44 -0700</pubDate>
      <category>JavaScript</category>
    </item>
    <item>
      <title>Re: plz help with really simple task</title>
      <link>http://www.programmersheaven.com/mb/java-script/334064/334167/re-plz-help-with-really-simple-task/#334167</link>
      <description>: ok i worked for a long time and i am at this point, only problem is colors are not as i defined them, red is supposed to be only red color.&lt;br /&gt;
: &lt;br /&gt;
: "&amp;lt;html&amp;gt;&amp;lt;title&amp;gt;Marks JS&amp;lt;/title&amp;gt;&lt;br /&gt;
: &amp;lt;body&amp;gt; &amp;lt;font size = "4"&amp;gt;&lt;br /&gt;
: &amp;lt;script language = "JavaScript"&amp;gt;&lt;br /&gt;
: &amp;lt;!--Hide from non-Javascript browsers&lt;br /&gt;
: var Today = new Date() ;&lt;br /&gt;
: var DayNumber = Today.getDay() ;&lt;br /&gt;
: &lt;br /&gt;
: var Day;&lt;br /&gt;
: var weekday=new Array(14);&lt;br /&gt;
: weekday[0]="Sunday"; &lt;br /&gt;
: weekday[1]="Monday"; &lt;br /&gt;
: weekday[2]="Tuesday"; &lt;br /&gt;
: weekday[3]="Wednesday"; &lt;br /&gt;
: weekday[4]="Thursday"; &lt;br /&gt;
: weekday[5]="Friday"; &lt;br /&gt;
: weekday[6]="Saturday"; &lt;br /&gt;
: weekday[7]="Sunday"; &lt;br /&gt;
: weekday[8]="Monday"; &lt;br /&gt;
: weekday[9]="Tuesday"; &lt;br /&gt;
: weekday[10]="Wednesday"; &lt;br /&gt;
: weekday[11]="Thursday"; &lt;br /&gt;
: weekday[12]="Friday"; &lt;br /&gt;
: weekday[13]="Saturday"; &lt;br /&gt;
: var color=new Array(14);&lt;br /&gt;
: color[0]="red"; &lt;br /&gt;
: color[1]="blue"; &lt;br /&gt;
: color[2]="green"; &lt;br /&gt;
: color[3]="orange"; &lt;br /&gt;
: color[4]="black"; &lt;br /&gt;
: color[5]="yellow"; &lt;br /&gt;
: color[6]="gray"; &lt;br /&gt;
: color[7]="red"; &lt;br /&gt;
: color[8]="Monday"; &lt;br /&gt;
: color[9]="blue"; &lt;br /&gt;
: color[10]="green"; &lt;br /&gt;
: color[11]="orange"; &lt;br /&gt;
: color[12]="black"; &lt;br /&gt;
: color[13]="yellow"; &lt;br /&gt;
: i = Today.getDay(); &lt;br /&gt;
: for(i=0;i&amp;lt;7;i++)&lt;br /&gt;
: {&lt;br /&gt;
: DayNumber = Today.getDay() +i;&lt;br /&gt;
: document.write("&amp;lt;font color = " + color[i] + " &amp;gt;"+"The day is " + weekday[DayNumber] + "&amp;lt;br/&amp;gt;&amp;lt;/font&amp;gt;") ;&lt;br /&gt;
: }&lt;br /&gt;
:  &lt;br /&gt;
: //Stop hiding --&amp;gt;&lt;br /&gt;
: &amp;lt;/script&amp;gt;&amp;lt;/font&amp;gt;&amp;lt;/table&amp;gt;&amp;lt;/body&amp;gt;&amp;lt;/html&amp;gt;"&lt;br /&gt;
: &lt;br /&gt;
It looks fine to me. I see each color only once, starting with red.&lt;br /&gt;
Here's how I would have coded it:&lt;br /&gt;
&lt;pre class="sourcecode"&gt;
  i = Today.getDay();
  document.write("&amp;lt;font color = " + color[i] + " &amp;gt;"+"Today is " + weekday[i] + "&amp;lt;br/&amp;gt;&amp;lt;/font&amp;gt;") ;
  i++;
  while (i &amp;lt;&amp;gt; Today.getDay())
  {
    document.write("&amp;lt;font color = " + color[i] + " &amp;gt;"+"The day is " + weekday[i] + "&amp;lt;br/&amp;gt;&amp;lt;/font&amp;gt;") ;
    i++
    if (i == 7) 
      i = 0;
  }
&lt;/pre&gt;&lt;br /&gt;
If you use this code, the arrays don't need to be "doubled", becasue i never gets above 6.&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/java-script/334064/334167/re-plz-help-with-really-simple-task/#334167</guid>
      <pubDate>Thu, 06 Apr 2006 22:13:52 -0700</pubDate>
      <category>JavaScript</category>
    </item>
    <item>
      <title>Re: plz help with really simple task</title>
      <link>http://www.programmersheaven.com/mb/java-script/334064/334250/re-plz-help-with-really-simple-task/#334250</link>
      <description>"It looks fine to me. I see each color only once, starting with red.&lt;br /&gt;
Here's how I would have coded it" &lt;br /&gt;
&lt;br /&gt;
thats the problem, its not supposed to start with red unless today is sunday, red should only appear once and only be for sunday.&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/java-script/334064/334250/re-plz-help-with-really-simple-task/#334250</guid>
      <pubDate>Fri, 07 Apr 2006 14:46:49 -0700</pubDate>
      <category>JavaScript</category>
    </item>
  </channel>
</rss>