First of all, I would like to apologize for reporting this again. I am new to this forum. In addition, I cannot comment on comments on the first post of this question or send private messages to users who commented, so I cannot communicate normally with anyone who is trying to help. How can I communicate with people who can comment or reply to this post? Again, I am sorry to repeat this question. From this side I am moving on.
I am just experimenting with Javascript, so my knowledge about this is small. I found a website that offers a guestbook tool ( http://www.bfnsoftware.com/index.php?eid=2013 ) and another is a star rating tool (addratings.com/). I would like to know which parts of the scripts to change and what to change, so that the result becomes a star rating tool under each new comment. By the way, I had to resort to scripts that are not hosted on my site, due to file type restrictions on my web host.
The guestbook code consists of two parts. The first is the input form. It is in it that there is a basic form:
<form action = "http://www.bfnsoftware.com/cgi-bin/home/Members/Guestbook/Guestbook.cgi?SiteID=30185&Book=3128" method = "POST"> <input type = "hidden" name = "action" value = "sign"> :: Guestbook :: Name: <input type = "text" name = "guestName" size = 30 maxlength = 60> Email Address: <input type = "text" name = "guestEmail" size = 30 maxlength = 100> Website: <input type = "text" name = "guestWebsite" size = 30 maxlength = 150> Vote: <select name = "guestVote" style = "width:203px;"> <option value = "0"> 0 - Worst <option value = "1"> 1 <option value = "2"> 2 <option value = "3"> 3 <option value = "4"> 4 <option value = "5" SELECTED> 5 - Average <option value = "6"> 6 <option value = "7"> 7 <option value = "8"> 8 <option value = "9"> 9 <option value = "10"> 10 - Best </select> :: Message :: <textarea cols = 45 rows = 6 name = "guestMessage"></textarea> <input type = "submit" value = "Submit"> </form>
I do not use the "guestWebsite", "guestEmail" or "guestVote" form fields on my site. I was able to choose that users enter html in the text field of "guestMessage".
This is the second part of the guestbook code. I put it on the page that I would like messages to be parsed.
<script language = "JavaScript" src = "http://www.bfnsoftware.com/cgi-bin/home/Members/Guestbook/Guestbook.cgi?SiteID=30185&Book=3128&action=js"> </script> <script language = "JavaScript"> document.write("<font size = 3><b>" + Title + "</b></font><br>"); document.write("<hr align = left color = #4F4F4F width = 400><p>"); for (nextE = 0; nextE < FilledEntries; nextE++) { document.write('<table border = 0 cellpadding = 1 cellspacing = 0 width = 502 bgcolor = #000000><tr><td width = 502>'); document.write('<table border = 0 cellpadding = 0 cellspacing = 0 width = 500 bgcolor = #DFDFDF>'); document.write('<tr><td width = 10></td><td width = 100> Name:</td><td width = 390>' + GuestName[nextE] + '</td></tr>'); document.write('<tr><td width = 10></td><td width = 100> E-mail: </td><td width = 390>' + GuestEmail[nextE] + '</td></tr>'); document.write('<tr><td width = 10></td><td width = 100> Website:</td><td width = 390><a href = ' + GuestWebsite[nextE] + '>' + GuestWebsite[nextE] + '</a></td></tr>'); document.write('<tr><td width = 10></td><td width = 100> Vote:</td><td width = 390>' + GuestVote[nextE] + '</td></tr>'); document.write('<tr><td width = 10></td><td width = 100> Date:</td><td width = 390>' + GuestDate[nextE] + '</td></tr>'); document.write('</table></td></tr><tr><td>'); document.write('<table border = 0 cellpadding = 0 cellspacing = 0 width = 500 bgcolor = #DFDFDF>'); document.write('<tr><td width = 10></td><td width = 100 valign = top>Message:</td><td width = 390>' + GuestMessage[nextE] + '</td></tr></table>'); document.write('</td></tr></table><p>'); } </script> <noscript> <a href = "http://www.bfnsoftware.com/cgi-bin/home/Members/Guestbook/Guestbook.cgi?SiteID=30185&Book=3128&action=view">View Guestbook</a> </noscript>
I changed it like this:
<script language = "JavaScript" src = "http://www.bfnsoftware.com/cgi-bin/home/Members/Guestbook/Guestbook.cgi?SiteID=30185&Book=3128&action=js"> </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>
Next is the stars rating of the script. Here is what I use:
<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"></scr'+'ipt>'); </script>
The site explained that if I wanted to use the code more than once on one page, I could, but I would need to define a unique value + " part aR_url = location.href +" "; as follows: +" 1 " for each code instance, or all results will be the same for each instance.
So, my question is again: βWhat parts of the scripts do I need to change and what should I change so that the result is a star rating tool for each new mail client?β, In advance for any help I can get.