View Single Post
Old 12-12-2012, 07:29 PM   PM User | #1
hym1988
New to the CF scene

 
Join Date: Dec 2012
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
hym1988 is an unknown quantity at this point
button > onclick > chart open

Hello fellows!
I have question.
Iam doing some project to my school and I have small problem.

I have chart (iam using jfreechart) in Chart.java file and after user is loading to his profe he should be able to push button and chart wit his statistics should appear. My problem is that I cant form proper onClick function. or mayby
Code:
window.parent.location.href
is wrong used?

here is code of website when user logged in and he can click on chart button
Code:
<%@ page contentType="text/html; charset=iso-8859-1" language="java"%>
<%@ page import ="java.sql.*" %>
<%@ page import ="javax.sql.*" %>
<html>
<head>
<link rel="stylesheet" href="style.css" type="text/css"> 
<script src="../WEB-INF/lib/amcharts.js" type="text/javascript"></script> 
<title>Successfully Login by JSP</title>
        
</head>

<body>
    
<input type=button onClick="parent.location='logOut.jsp'" value='Wyloguj'>

<br>
Zalogowano pomyslnie<br />
Twoje dane :<br />
<%
out.print("Nazwa uzytkownika :<b>"+session.getAttribute("sUserID")+ "</b>"+"<br>");
out.print("Imie i Nazwisko :<b>"+session.getAttribute("sUserName")+"</b>"+"<br>");
out.print("E-mail :<b>"+session.getAttribute("sEmail")+"</b>");
%>



<form action="nowe_dane.jsp" method="post">
<input type="text" name="wynik_badania" /> Poziom cukru z dnia:
<script language="javascript"> 
<!-- 
today = new Date(); 
document.write(" ", today.getDate(),"/",today.getMonth()+1,"/",today.getYear()); 
//--> 
</script> <br>
 <input type="submit" />
<input type=button onClick="window.parent.location.href = 'src/java/demo/Chart.java' " value='Wykres'>

 


</body>
</html>


hym1988 is offline   Reply With Quote