image description ->post_content (1 post)

  1. gregmooredesign
    Posted 5 years ago #

    ok so im working on a site...

    i want do display the image description in the rollover at the top of the page.

    i have accomplished this using this <?php echo $all_photo_arr[0]->post_content; ?>which shows the 1st image desc
    or <?php echo $photo->post_content; ?> which shows the last img desc.

    but i want it to change when the images change.

    so i added this to the js that switches the images.

    //switch image
    function SwitchImage(img){
    	$jpreloader.fadeIn("fast"); //show preloader
    	var theNewImg = new Image();
    	theNewImg.onload = CreateDelegate(theNewImg, theNewImg_onload);
    	theNewImg.src = img;
    	document.getElementById("info").innerHTML= theNewImg.src ;  

    this shows the new image src. i have tried replacing it with the above php echo, but it only loads the 1st or last desc.

    it seems i need to replace the .src with somthing. any ideas?

Topic Closed

This topic has been closed to new replies.

About this Topic

  • RSS feed for this topic
  • Started 5 years ago by gregmooredesign
  • This topic is not resolved
  • WordPress version: 3.1.3


No tags yet.