<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Example</title>
<!--[if IE]><script language="javascript" type="text/javascript" src="../excanvas.min.js"></script><![endif]-->
<script language="javascript" type="text/javascript" src="jquery.js"></script>
<script language="javascript" type="text/javascript" src="jquery.flot.js"></script>
</head>
<body>
<div id="placeholder" style="width:600px;height:300px;"></div>
<script id="source" language="javascript" type="text/javascript">
$(function () {
var d1 = [];
<%
SET ac = Server.CreateObject("ADODB.Connection")
ac.Open "driver={sql server}; server=localhost; database=db_name; uid=user; pwd=secret"
SET rs = Server.CreateObject("ADODB.Recordset")
SET rs = ac.Execute("SELECT data_x, data_y FROM data_log")
FOR EACH field IN rs.Fields
Response.Write "d1.push([" & field.data_x & ", " & field.data_y & "]);"
NEXT
%>
$.plot($("#placeholder"), [d1]);
});
</script>
</body>
</html>
Wednesday, 26 October 2011
google's jquery flot graph api using classic ASP
Labels:
JQuery
Subscribe to:
Post Comments (Atom)
I found the info on this blog valuable.
ReplyDelete