I have an array in javascript which i derived from json_encode in jqplot. how to plot the array in jqplot.
The following code gets the values and put in the two textboxes making a javascript array. I need to plot the newArray2JS in x-axis and newArrayJS in y-axis
<script type='text/javascript'>
function parseMe(){
var json=document.getElementById('json_text').value;
var obj=eval('('+json+')');
document.createElement('u1');
alert(obj);
for(val in obj){
alert(obj[val]);
//alert(obj[val]);
//}
}}
</script>
</head>
<body>
<form>
<input type='text' id='json_text1' value='<?php echo $newArrayJS; ?>' />
<input type='text' id='json_text2' value='<?php echo $newArray2JS; ?>' />
<input type='button' value='parse' onclick='parseMe();' />
</form>
<div id = 'chart1'></div>
I am new to jqplot and json.
How can i do this.