tags:

views:

56

answers:

1

I have set up an example at: http://xtboard.com/forum;viewpost;281258;page0.html . If anybody can help me out, it would be greatly appreciated.

Update:

The first script is a guest book:

`<script language = "JavaScript" src = "http://www.bfnsoftware.com/cgi-bin/home/Members/Guestbook/Guestbook.cgi?SiteID=30185&amp;Book=3128&amp;action=js"&gt;
 </script>
 <script language = "JavaScript">

     document.write("<b>" + Title + "</b><br />");
     for (nextE = 0; nextE < FilledEntries; nextE++) {
         document.write('<div class="entry">Username:   ' + GuestName[nextE] + '<br />');
         document.write('Submission Date:   ' + GuestDate[nextE] + '<br />');
         document.write('Line Submission:   ' + GuestMessage[nextE] + '<br /><br />');
         document.write('</div>');
     }
 </script>`

The second script is a star rating script. I think it should get it's unique id from:

`GuestDate[nextE]`

in the first code.

`<script type='text/javascript'>
 aR_BgColor="";
 aR_FgColor="";
 aR_url=location.href + "";
 aR_title=document.title + "";
 aR_StarType ='1';
 document.write('<div id="aR_star_info" class="aR_star_info"></div>');
 document.write('<scr'+'ipt type="text/JavaScript" src="http://addratings.com/aR_BootStrap.js"&gt;&lt;/scr'+'ipt&gt;');
 </script>`

As each guestbook entry is made, the first script basicaly repeats. I would like to write a star rating under each entry as it posts.

A: 

In aR_Create.js the last line is

document.getElementById('aR_star_info' + id).innerHTML = sH;

But the id for each of your entries is the same. When you set the id attribute you're using myID, but you set myID = aR[0].id It never changes.

And while you're at it, why not just create a single .js file with the methods you want rather than wasting http resources by loading the same script files over and over again?

Matthew Smith