»
EnglishFrenchVietnamese

Print - Rating script - JavaScriptBank.com

Full version: jsB@nk » Utility » Rating script
URL: http://www.javascriptbank.com/rating-script-index.html

Rating script © JavaScriptBank.comThis JavaScript uses images to visitors can rate farvarite things on your webpages.

Full version: jsB@nk » Utility » Rating script
URL: http://www.javascriptbank.com/rating-script-index.html



JavaScript
<SCRIPT>Star=new Array()Star[0]=new Image()Star[0].src="blnk.gif"for(s=1;s<6;s++){Star[s]=new Image()Star[s].src="star"+s+".gif"}clix=1function RateNow(){clix=(clix<5)?clix+1:1document.StarImg.src=Star[clix].srcdocument.forms[0].Rate.value=clixdocument.forms[0].StarRate[clix-1].checked=true}function StrRate(x){clix=xdocument.StarImg.src=Star[x].srcdocument.forms[0].Rate.value=x}</SCRIPT><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->


HTML
<FORM><P>Please rate this topic by <BR><UL>Either  <P>  <LI>click on the star(s) here <A href="javascript:RateNow()">  <IMG   src="star1.gif" border=0 name=StarImg width="55" height="12"></A>   <P></P>  <LI>or click on one of the radios below<BR><INPUT onclick=StrRate(1)   type=radio value=1 name=StarRate><IMG src="star1.gif"   border=0 width="55" height="12"><BR><INPUT onclick=StrRate(2) type=radio value=2 name=StarRate><IMG   src="star2.gif" border=0 width="55" height="12"><BR><INPUT onclick=StrRate(3) type=radio   value=3 name=StarRate><IMG src="star3.gif" border=0 width="55" height="12"><BR><INPUT   onclick=StrRate(4) type=radio value=4 name=StarRate><IMG   src="star4.gif" border=0 width="55" height="12"><BR><INPUT onclick=StrRate(5) type=radio   value=5 name=StarRate><IMG src="star5.gif" border=0 width="55" height="12"><BR></LI></UL><HR><P>NB: This input box can and should be made hidden<BR><INPUT size=4 name=Rate> STARS <INPUT type=submit value=SUBMIT> </FORM><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->


Files
http://javascriptbank.com/javascript/utility/Rating_script/Rating_script_images.zip