<?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xml:base="https://www.webmaster-forums.net/crss/node/1035173" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title></title>
    <link>https://www.webmaster-forums.net/crss/node/1035173</link>
    <description></description>
    <language>en</language>
          <item>
    <title></title>
    <link>https://www.webmaster-forums.net/html-css-and-javascript/events-and-javascript#comment-1204014</link>
    <description> &lt;p&gt;Nevermind... I fixed it.&lt;br /&gt;
I had to loop through the getElementsByTagName(&#039;a&#039;) of each box after the update in stead of the document onload. I actually knew, but it&#039;s kinda hard to think of it at the right moment &lt;img src=&quot;https://www.webmaster-forums.net/misc/smileys/big.png&quot; title=&quot;Laughing out loud&quot; alt=&quot;Laughing out loud&quot; class=&quot;smiley-content&quot; /&gt;&lt;/p&gt;
 </description>
     <pubDate>Thu, 13 Jul 2006 10:13:20 +0000</pubDate>
 <dc:creator>Jack Michaelson</dc:creator>
 <guid isPermaLink="false">comment 1204014 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/html-css-and-javascript/events-and-javascript#comment-1203819</link>
    <description> &lt;p&gt;Sorry for not explaining enough. Here&#039;s my second try &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;A screenshot:&lt;br /&gt;
&lt;img src=&quot;http://img161.imageshack.us/img161/4808/favo9zp.jpg&quot; alt=&quot;&quot; class=&quot;bb-image&quot; /&gt;&lt;/p&gt;
&lt;p&gt;This box represents a collection of favorites. It&#039;s an html-table.&lt;br /&gt;
- Users can save favorite parts of our website in their account. Every row thats starts with a checkbox in the screenshot represents such a part (the language is Dutch btw).&lt;br /&gt;
- Users can rate these favorites by clicking the stars (the red box in the screenshot). Every star is a anchor element.&lt;br /&gt;
- Users can sort these favorites, for instance, by rating (the green box in the screenshot).&lt;/p&gt;
&lt;p&gt;The parent page not only contains this box, but several simular boxes. Each of these tables is surrounded by a container div.&lt;br /&gt;
All onclick events on the parent page are assigned by a js-function that is called onload.  By reading the &#039;rel&#039; attribute of each element in the array document.getElementsByTagName(&#039;a&#039;) it decides which next function should be called.&lt;/p&gt;
&lt;p&gt;Each star (red box) in the screenshot is a link that fires an ajax request that does two things:&lt;br /&gt;
- it saves an updated rating (through an http subrequest)&lt;br /&gt;
- it updates the td in the last column, which is the last updated date.&lt;/p&gt;
&lt;p&gt;Each link (green box) in the sort bar does one thing:&lt;br /&gt;
- it rebuilds the table by re-sorting the data, in this case by rating. The result is put in the earlier mentioned container div. The result looks quite the same, only the table rows are in different order. This result contains the rate stars again.&lt;/p&gt;
&lt;p&gt;But... the stars no longer have the rate function assigned. I&#039;m guessing this is because the content of the array document.getElementsByTagName(&#039;a&#039;) has changed. Somehow I should be able to re-assign the rate function to these stars, but I don&#039;t want to refresh or rebuild the page. How do I do this?&lt;/p&gt;
&lt;p&gt;I know I can assign it by coding &#039;&lt;a d like to do this&gt;&lt;/a&gt;&lt;/p&gt;
 </description>
     <pubDate>Mon, 10 Jul 2006 15:19:12 +0000</pubDate>
 <dc:creator>Jack Michaelson</dc:creator>
 <guid isPermaLink="false">comment 1203819 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/html-css-and-javascript/events-and-javascript#comment-1203810</link>
    <description> &lt;p&gt;Am having trouble conceptualising what you&#039;re trying to do! Is this code located in these subpages? Or is it located in the container document? What are these subpages, frames? Inline frames?&lt;/p&gt;
&lt;p&gt;I also don&#039;t understand why the array containing the anchors is broken when rate is called. What happens to make it invalid?&lt;/p&gt;
 </description>
     <pubDate>Mon, 10 Jul 2006 12:15:40 +0000</pubDate>
 <dc:creator>JeevesBond</dc:creator>
 <guid isPermaLink="false">comment 1203810 at https://www.webmaster-forums.net</guid>
  </item>
  </channel>
</rss>
