Jump to content

mellojoe

New Members
  • Posts

    5
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

mellojoe's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Ok. This worked. Here is the exact code I'm using: I created a file called "image_refresher_file.php". The only code in that file is this: <?php header( 'refresh: 17;' ); ?> <style> img { border: solid 1px #000; } </style> <?php include('http://jpdimaggio.com/gallery/block-random_no_caption.php'); ?> And then in the main "index.php", I have included this little gem. <iframe id="image_holder" onLoad="calcHeight();" src="image_refresher_file.php" scrolling="no" frameborder="0"> </iframe> I found a quick way to set the height of the iframe to be the same as the picture height, since in my case I won't know what the height of the picture is, since I won't know what picture is being called. This little JS figures that out for me. That is what the "onLoad" is calling. <script language="JavaScript"> <!-- function calcHeight() { var the_height = document.getElementById('image_holder').contentWindow.document.body.scrollHeight; document.getElementById('image_holder').height = the_height; } //--> </script> It works like a CHAMP! Thank you all for your help with this. And thank you, specifically, to kratsg for suggesting the dreaded iFrame. I hate to admit it, but it does exactly what I need it to. THANKS!
  2. As mush disdain as I've heard about iFrames, I've been hesitant to try them. But, this looks promising. I'll give it a shot.
  3. Here's the deal. I'm currently using Gallery1 for my photo galleries. They have included a .php file which generates a random image from all of the galleries. All I have to do to get the random image on any page is to use the <php include()>. I do not have access to edit that file, so I am stuck with only manipulating how I call that file. This looks promising. But, I have no idea where to begin. Since I can't edit the .php file that generates the random image, I don't think this will work. Also, the imagesize and imagename... I won't know those since they are handled within the random.php that is created for my use from Gallery1. So, I'm stuck again, I think. I am guessing, now, that I need a basic function. refresh_image(); timer_countdown(30seconds); when timer_countdown== 0 call run_file(random.php) Something like this seems like it must be possible, huh?
  4. I don't have access to the .php file that is called. I just have the <include(file.php)>, and the server's file handles the image code. I can't get into that. So, I won't know the name of the image file or anything that is called. All I can do is to call the include.
  5. I have a .php file that I call through an include in the main page. It is a server-side file that pulls in a random image from the photo galleries. What I'd like to do is simply set it up so that it calls that include file once every so often, sort of as an auto-refresh. I've spent the last week searching the internet, but I can't seem to find a solution to this problem. But, then again, my knowledge and understanding of PHP is limited. I have tried different solutions, but now I realize the best one needs to be simply setting up a timer that as it counts-down to zero it runs the 'include()' function. This seems to be simple, but I just can't figure it out. Thanks in advance. What do you suggest?
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.