Hello,

I would like some my frustration gone. I would like to know the
following:

so when you json_encode with php, how do you get it from that page
onto the $.getJSON
I know that $_GET will retrieve information from the URL and if its
ajax no information gets put into the
URL but do I need to use a $_GET to retrieve the information from
JSON.


so my code this is my code
//main.php

searchAndPrintVideosByKeywords($computersarr);

//functions.php
//in this file is the function searchAndPrintVideosByKeywords
//as well as the json_encode function that gets called.

  echo 'Category: ' . $videoEntry->getVideoCategory() . "\n";
  json_encode(array(
  'data'  => '<object width="425" height="344"><param name="movie"
value="'.$videoEntry->getFlashPlayerUrl().'"></param><param
name="allowFullScreen" value="true"></param><embed src="'.$videoEntry-
>getFlashPlayerUrl().'" type="application/x-shockwave-flash"
allowfulscreen="true" width="425" height="344"></embed></object>'));

then I would from jquery do the following in main.php:

 $(document).ready(function() {
        alert(data);
                $.getJson('header.php',function(data)
                {
                alert(data);
                getElementById("video_display").innerHTML(data);
                });

        alert(json.data);


   $('a').click(function(event){

        event.preventDefault();
        if  ($(this).hasClass("mycomments"))
        {
                if ($(this).css('display') == 'none')
                {
                        $(this).show();
                }
                else
                {
                        $(this).hide();
                }
        }

        if ($(this).hasClass("videotitle"))
        {
                var thename = $(this).attr("href");

         }
});
 }
 return false;
 );

All im trying to do is ajax a video inbeneath the thumbnail of the
video when a they click on show video

Reply via email to