<!--METADATA TYPE="typelib" uuid="00000205-0000-0010-8000-00AA006D2EA4" -->
<%
Option Explicit
Session.CodePage=65001
Response.Charset="UTF-8"
%>
<!--#include virtual="include/paramSQL.asp"-->
Dim cmdTxt
cmdTxt = "SELECT name, score FROM scores;"
openCommand Application("examples"),"getScores 1"
getRS db_rs, cmdTxt, "getScores 2"
if NOT (db_rs.bof AND db_rs.eof) then
Dim barchart1
barchart1 = "<div style="&chr(34)&"position: absolute; width: 100px; height: 15px; "&chr(34)&"><div style="&chr(34)&"position: absolute; width: 300px; height: 15px; left: 115px"&chr(34)&"><img alt="&chr(34)&"A bar graphic"&chr(34)&" src="&chr(34)&"images/scale300.gif"&chr(34)&" width="&chr(34)&"300"&chr(34)&" height="&chr(34)&"15"&chr(34)&"></div>Bar Chart</div><br>"
while not db_rs.eof
barchart1 = barchart1 & "<div style="&chr(34)&"position: absolute; width: 100px; height: 15px; "&chr(34)&"><div style="&chr(34)&"position: absolute; width: 300px; height: 15px; left: 115px"&chr(34)&"><img alt="&chr(34)&"A bar graphic"&chr(34)&" src="&chr(34)&"images/1x15navy.gif"&chr(34)&" width="&CInt(db_rs("score"))*3&" height="&chr(34)&"15"&chr(34)&"> "& db_rs("score") &"</div>"&db_rs("name")&"</div><br>"
db_rs.movenext
wend
end if
closeCommand
closeRS
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="author" content="Roderick Divilbiss">
<meta name="copyright" content="© 2005-2010 Roderick Divilbiss">
<title>bar chart ASP</title>
<style>
#chart {
width:600px;
margin-left:auto;
margin-right:auto;
}
</style>
</head>
<body>
<div id="chart"><%=barchart1%></div>
</body>
</html>
Date Validation Using JavaScript .
Cross-Browser Clipboard Copy .
Loading Images With Remote Scripting .
Why JavaScript In Hyperlinks Is Bad .
Change The Submit Button To Show Waiting For AJAX Response .
European Date Validation Using JavaScript .
Database Results To Client Side Array .
Reading Files With JavaScript .
AJAX For Plain Text And HTML .