Hi all
I am trying to do cloud tagging.
I found HTML and JQuery code to implement this one.
Code:
<html>
<head>
<script type="text/javascript" src="http://www.google.com/jsapi"></script>
<script type="text/javascript" src="http://word-cumulus-goog-vis.googlecode.com/svn/trunk/wordcumulus.js"></script>
<script type="text/javascript" src="http://word-cumulus-goog-vis.googlecode.com/svn/trunk/swfobject.js"></script>
<script type="text/javascript">
google.load("visualization", "1");
google.setOnLoadCallback(drawVisualization);
function drawVisualization() {
var data = new google.visualization.DataTable();
data.addColumn('string', 'Tag');
data.addColumn('string', 'URL');
data.addRows(10);
data.setCell(0, 0, 'Brazil');
data.setCell(0, 1, 'http://www.youtube.com/results?search_query=brazil+fifa+world+cup');
data.setCell(1, 0, 'Italy');
data.setCell(1, 1, 'http://www.youtube.com/results?search_query=italy+fifa+world+cup');
data.setCell(2, 0, 'Germany');
data.setCell(2, 1, 'http://www.youtube.com/results?search_query=germany+fifa+world+cup');
data.setCell(3, 0, 'Argentina');
data.setCell(3, 1, 'http://www.youtube.com/results?search_query=argentina+fifa+world+cup');
data.setCell(4, 0, 'Uruguay');
data.setCell(4, 1, 'http://www.youtube.com/results?search_query=uruguay+fifa+world+cup');
data.setCell(5, 0, 'France');
data.setCell(5, 1, 'http://www.youtube.com/results?search_query=france+fifa+world+cup');
data.setCell(6, 0, 'England');
data.setCell(6, 1, 'http://www.youtube.com/results?search_query=england+fifa+world+cup');
data.setCell(7, 0, 'Bhagirathi');
data.setCell(7, 1, 'http://www.youtube.com/results?search_query=england+fifa+world+cup');
data.setCell(8, 0, 'Raj');
data.setCell(8, 1, 'http://www.youtube.com/results?search_query=england+fifa+world+cup');
data.setCell(9, 0, 'RBS');
data.setCell(9, 1, 'http://www.youtube.com/results?search_query=england+fifa+world+cup');
var vis = new gviz_word_cumulus.WordCumulus(document.getElementById('mydiv'));
vis.draw(data, {text_color: '#ff00ff', speed: 100, width:500, height:500});
}
</script>
</head>
<body>
<big>FIFA World Cup: Country appearances in the final four</big>
<div> </div>
<div id="mydiv"></div>
</body>
</html>
This is full fill my requirement but
i want to fetch that tags from server side .
means :in my database i have some tags which i want to fetch and show in the UI.
Here I have done hard coded.
how to do this one dynamically??
I tried to solve this.
I found that if I use ajax than i can solve this problem.
But i don't know how to use ajax. and solve this problem.
My Sql query is
SELECT DISTINCT TAG_NAME FROM TAGS;
Please help me to solve this problem.
thanks in advance.