Dear Brothers
I have a .cgi script which outputs an HTML page.
The HTML page includes a short jquery script which draws a graph on the HTML page.
The critical line in the jquery script is:
<script> var data=[[0,170],[1,27],[2,3],[3,0],[4,0],[5,0],[6,0],[7,0],[8,0],[9,0],[10,0]];
where the bits in square brackets are positions and data.
This works fine as long as the data line is hard coded, but I normally don't know what the data is going to be till the .cgi script has run.
Ideally, I'd like to write a line like this:
<script> var data=$mydata where $mydata is a string prepared by the cgi script. However, jquery seems not to like this. I think this, is because it interprets the $ as a reference to itself.
Does anyone have any suggestions how to solve this?The general question is how do I move smoothly between perl and jquery?
In reply to jquery scripts by hermit23
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |