hye guys, i have a html code as below:
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<script src="graph/enhance.js" type="text/javascript"></script>
<script src="graph/excanvas.js" type="text/javascript"></script>
<script src="graph/jquery.min.js" type="text/javascript"></script>
<script src="graph/visualize.jQuery.js" type="text/javascript"></script>
<link href="graph/basic.css" rel="stylesheet" type="text/css" />
<link href="graph/visualize.css" rel="stylesheet" type="text/css" />
<link href="graph/visualize-light.css" rel="stylesheet" type="text/css" />
<style type="text/css">
.dwpeAd {
color: #333;
background-color: #F4F3Ea;
position:fixed;
right: 20px;
top: 20px;
padding: 5px;
}
.visualize {
margin: 20px 0 0 30px;
}
</style>
<script type="text/xml">
<oa:widgets>
<oa:widget wid="2281525" binding="#jQueryVisualizeChart" />
</oa:widgets>
</script>
</head>
<body>
<script type="text/javascript">
$(function(){
$('table').visualize({type: 'line', height: '300px', width: '420px', appendTitle : true, lineWeight : 8, colors : ['#b3c3f4','#39007a','#a4deab','#49a7c0','#8d10ee','#5a3b16','#26a4ed','#f45a90','#e9e744']}).appendTo('#jQueryVisualizeChart').trigger('visualizeRefresh');
});
</script>
<table>
<caption>
Student Information
</caption>
<thead>
<tr>
<td></td>
<th scope="col">Attd</th>
<th scope="col">Quiz1</th>
<th scope="col">Quiz2</th>
<th scope="col">Quiz3</th>
<th scope="col">Quiz4</th>
<th scope="col">Test1</th>
<th scope="col">Test2</th>
</tr>
</thead>
<tbody>
<tr>
<th scope="row">Mary</th>
<td>190</td>
<td>160</td>
<td>40</td>
<td>120</td>
<td>30</td>
<td>70</td>
<td>70</td>
</tr>
</tbody>
</table>
<br />
<div id="jQueryVisualizeChart"></div>
</body>
</html>
and i tried to echo it in php like this:
<script type="text/javascript">
function success()
{
$(function(){
$('table').visualize({type: 'line', height: '300px', width: '420px', appendTitle : true, lineWeight : 8, colors : ['#b3c3f4','#39007a','#a4deab','#49a7c0','#8d10ee','#5a3b16','#26a4ed','#f45a90','#e9e744']}).appendTo('#jQueryVisualizeChart').trigger('visualizeRefresh');
});
}
</script>
<?php
echo '
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<script src="graph/enhance.js" type="text/javascript"></script>
<script src="graph/excanvas.js" type="text/javascript"></script>
<script src="graph/jquery.min.js" type="text/javascript"></script>
<script src="graph/visualize.jQuery.js" type="text/javascript"></script>
<link href="graph/basic.css" rel="stylesheet" type="text/css" />
<link href="graph/visualize.css" rel="stylesheet" type="text/css" />
<link href="graph/visualize-light.css" rel="stylesheet" type="text/css" />
<style type="text/css">
.dwpeAd {
color: #333;
background-color: #F4F3Ea;
position:fixed;
right: 20px;
top: 20px;
padding: 5px;
}
.visualize {
margin: 20px 0 0 30px;
}
</style>
<script type="text/xml">
<oa:widgets>
<oa:widget wid="2281525" binding="#jQueryVisualizeChart" />
</oa:widgets>
</script>
</head>
<body>
<script type="text/javascript"> success(); </script>
<table>
<caption>
Student Information
</caption>
<thead>
<tr>
<td></td>
<th scope="col">Attd</th>
<th scope="col">Quiz1</th>
<th scope="col">Quiz2</th>
<th scope="col">Quiz3</th>
<th scope="col">Quiz4</th>
<th scope="col">Test1</th>
<th scope="col">Test2</th>
</tr>
</thead>
<tbody>
<tr>
<th scope="row">Mary</th>
<td>190</td>
<td>160</td>
<td>40</td>
<td>120</td>
<td>30</td>
<td>70</td>
<td>70</td>
</tr>
</tbody>
</table>
<br />
<div id="jQueryVisualizeChart"></div>
</body>
</html>';
?>
BUT it's not working. Any suggestion? i only wanted to use echo if possible.