function pntCnvIe()
{
this.cnv.insertAdjacentHTML("BeforeEnd", jg_fast? this.htmRpc() : this.htm);
this.htm = '';
}
Is the part of the code where i am getting the error :
Webpage error details
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; InfoPath.2)
Timestamp: Fri, 27 Aug 2010 11:09:11 UTC
Message: Object doesn't support this property or method
Line: 83
Char: 2
Code: 0
URI: http://localhost:8080/o2a_server/js/wz_jsgraphics.js
You need to login into the system to look at that page.
Code:
<TR HEIGHT="99%">
<TD>
<TABLE ALIGN="center" BORDER="0" HEIGHT="100%" WIDTH="100%" CELLPADDING="0" CELLSPACING="0">
<%
Connection connection = null;
Statement statement = null;
ResultSet rs = null;
try
{
Class.forName("com.mysql.jdbc.Driver").newInstance();
connection = DriverManager.getConnection(conn_url,username,password);
statement = connection.createStatement();
String QueryString = "select COW_ID,COW_NAME from oxy_cows where cow_id<>1 and MALE_OR_FEMALE ='F'";
rs= statement.executeQuery(QueryString);
while (rs.next())
{
cow_id=rs.getString(1);
cow_name=rs.getString(2); %>
<tr height="9%" valign="middle">
<td align="center">
<center>
<div id="myCanvas" style="overflow: auto; position:fixed;height:300px;width:100%; "></div>
<script>
var g = new line_graph();
var g2 = new line_graph();
var color = 4;
var color1 = 55;
<%
Connection connection1 = null;
Statement statement1 = null;
ResultSet rs1 = null;
try
{
Class.forName("com.mysql.jdbc.Driver").newInstance();
connection1 = DriverManager.getConnection(conn_url,username,password);
statement1 = connection1.createStatement();
String QueryString1 =null;
QueryString1 = "select date_format(MILK_DATE,'%d'),MORNING_MILK from oxy_milk_production where COW_NUMBER='"+cow_id+"'and milk_date between '"+doctor_milking_allcow_from_date+"' and '"+doctor_milking_allcow_to_date+"' order by milk_date";
rs1 = statement1.executeQuery(QueryString1);
while (rs1.next())
{ %>
g.add('<%=rs1.getString(1)%>', <%=rs1.getString(2)%>);
<%}
rs1.close();
statement1.close();
connection1.close();
}
catch (Exception ex)
{
%><FONT SIZE="+3" COLOR="green"> <%
out.println("Unable to connect to database.");
statement1.close();
connection1.close();
}
%>
<%
Connection connection2 = null;
Statement statement2 = null;
ResultSet rs2 = null;
try
{
Class.forName("com.mysql.jdbc.Driver").newInstance();
connection2 = DriverManager.getConnection(conn_url,username,password);
statement2 = connection2.createStatement();
String QueryString2 =null;
QueryString2 = "select date_format(MILK_DATE,'%d'),EVENING_MILK from oxy_milk_production where COW_NUMBER='"+cow_id+"'and milk_date between '"+doctor_milking_allcow_from_date+"' and '"+doctor_milking_allcow_to_date+"' order by milk_date";
rs2 = statement2.executeQuery(QueryString2);
while (rs2.next())
{ %>
g2.add('', <%=rs2.getString(2)%>);
<%}
rs2.close();
statement2.close();
connection2.close();
}
catch (Exception ex)
{
%><FONT SIZE="+3" COLOR="green"> <%
out.println("Unable to connect to database.");
statement2.close();
connection2.close();
}
%>
g.setMax(10);g.setColor(color);
g2.setMax(10);g2.setColor(3);
g.render("myCanvas", "Blue: Morning, Red: Evening");
g2.render("myCanvas", "");
delete g;
delete g2;
</script>
<FONT color="8A5C2E" SIZE="5" STYLE="font-family: sans-serif ">Milking Graph for <%=cow_name%>. </FONT>
</center>
</td>
</tr>
<%}
rs.close();
statement.close();
connection.close();
%>
</TABLE>
<% }
catch (Exception ex)
{
%> <FONT SIZE="+3" COLOR="green"> <% out.println("ABCSINGLE:Unable to connect to database.");
statement.close();
connection.close();
}
%> </FONT></TD>
</TR>
Is the code where i have used the script.
Thanks
Bookmarks