CodeAve.com CodeAve.com - ASP - Miscellaneous
ASP
·Read/Write
·Script Writers
·Database Display
·Response Objects
·Server Variables
·Random Events
·Articles
·Miscellaneous
·Contents
·What's New?
JavaScript
CSS
HTML
Maps
Links
Mail List
Search
Sitemap


 


Rating Scale
Many sites offer a graphical user rating system.  This allows for simple and easy understanding of how other viewers view specific content (imdb.com and aspin.com are great examples).  The following example (while not truly graphical, we use •• in place of a graphic) will take some random numbers (between 1 and 10) and derive and average of those random numbers (this is in place of data from an actual db) and scale the results.  Refresh the output a couple of times for a fuller demonstration.
View the Output
Text View
Print View
Mail this Link
Download the Code

<%
'generates 10 random numbers that are accumulated by the random_total variable
' this is used in place accumulating stats from a rating db 
randomize
for counter = 1 to 10
random_number = Int(10 * Rnd + 1)
random_total= random_total + random_number
next

' creates the average of the 10 random numbers
total_score=random_total/10
%>

<center>
<font size="5" color="#FF0000">

<%
' creates a loop that will output the number of red dots to scale the average 
for count = 1 to round(total_score)
%>


&#149

<%
next
%>


<font size="5" color="#000000">
<%
for counter = 1 to round((10-total_score))
%>

&#149

<%
next
%>


</font>
<br>
<font size="3" color="#000000">

<%= round(total_score) & " out of 10" %>

 

 

 



ASP: What's New? | Articles | Script Writers | Database Display | Read/Write
Server Variables | Response Objects | Random Events | Miscellaneous
HTML: Forms | Hyperlinks | Headers | Tables | Hyperlinks | Headers | Text Display
JavaScript: Document Info | Forms | Images | Navigation | Script Writers
CSS: Basics | Page Display | Text Display | Script Writers | Miscellaneous
  • 2014 michael kors
  • air max women 2013
  • 2014 michael kors
  • air max 2014
  • oakley glasses
  • oakley glasses

  • Maps: Map Script Writers | Bing Maps | Google Maps
  • bottes fr
  • ugg boot
  • Privacy Statement

    CodeAve.com is hosted by MyHosting.com
    Donate Food Online with a Mouse Click at TheHungerSite.com
    Donate Land Online with a Mouse Click at TheRainForestSite.com
    © 1999 - 2017 CodeAve.com
    All Rights Reserved

  • Kids jordan 6 rings
  • Jordan retro 10
  • Jordan retro 3