i want to get all the details of youtube,so if the user tick the checkbox i want to get the full details of video in javascript,i have done but only i can get first word from the you tube name, you tube name,example $name="Geet - Episode 456 - Clip 1 [24th November 2011] HQ" so alert(name) is showing only Geet .why? i need full name. this is my code:where i have do the mistake.
<?php
$watch="youtubelink";
$thumbnail="youyubeimage";
$val="somevalue";
$name="youtubename";
//eg:$name="Geet - Episode 456 - Clip 1 [24th November 2011] *HQ*";
$results=$watch.",".$thumbnail.",".$val.",".$name;
?>
<input type="checkbox" name="checkbox[]" id="checkbox[]" class="addbtn" value=<?php echo $results;?> />
this is my js:
function chkbox()
{
$('[name^=checkbox]:checked').each(function() {
var ckballvalue=($(this).val());
var fields = ckballvalue.split(/,/);
var link = fields[0];
var thumbnail = fields[1];
var name = fields[3];
//var description = fields[4];
var categ = fields[2];
alert(name);
var data = {
action: 'my_action',
link:link,
thumbnail:thumbnail,
name:name,
categ:categ
};