Print Page | Close Window

Why wont this code work

Printed From: Web Wiz Forums
Category: Web Wiz Web App Support Forums
Forum Name: Web Wiz Forums
Forum Description: Support forum for Web Wiz Forums application.
URL: https://forums.webwiz.net/forum_posts.asp?TID=230
Printed Date: 28 March 2026 at 8:51pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Why wont this code work
Posted By: worldwide1504
Subject: Why wont this code work
Date Posted: 16 February 2003 at 5:23pm

<%
     If lngAuthorNumOfPosts < 50 Then
         Response.Write("<img src=""forum_images/0_star_rating.gif"" align=""center"">")       
     Elseif lngAuthorNumOfPosts >= 150 Then
         Response.Write("<img src=""forum_images/1_star_rating.gif"" align=""center"">")    
     Elseif lngAuthorNumOfPosts >= 250 Then
         Response.Write("<img src=""forum_images/2_star_rating.gif"" align=""center"">")
     Elseif lngAuthorNumOfPosts >= 400 Then
         Response.Write("<img src=""forum_images/3_star_rating.gif"" align=""center"">")
     Elseif lngAuthorNumOfPosts >= 500 Then
         Response.Write("<img src=""forum_images/4_star_rating.gif"" align=""center"">")  
     Else
         Response.Write("<img src=""forum_images/5_star_rating.gif"" align=""center"">")              
     End If
%>

 

It just shows the 0_star_rating.gif for everyone.




Replies:
Posted By: michael
Date Posted: 16 February 2003 at 9:29pm
Well I am not sure why it only gives you the zero star image but the script has a major flaw no matter what. Try using Select Case, it would serve you metter.....


Posted By: gr8indianbear
Date Posted: 17 February 2003 at 1:45am
check that the Posts are being counted properly, and the counted number is stored correctly to 'lngAuthorNumofPosts' but yea, Select Case would be better



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net