Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4570196
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T19:19:39+00:00 2026-05-21T19:19:39+00:00

I try to get the page like.It replaces images every 10 seconds,using jquery. I

  • 0

I try to get the page like.It replaces images every 10 seconds,using jquery.

I put my code below.(Source Code: http://blog.tremaynechrist.co.uk/post/2011/04/17/Photofy-New-Animated-Photo-Swap-Plugin-for-JQuery.aspx)

<script type="text/javascript">
      $(document).ready(function () {
          var getData = setInterval(function()
         {
             //$('#displayData').load('anyphpfile.php?randval='+ Math.random());

          var myOptions = {
            url:'anyphpfile.php?randval='+ Math.random(),

            success: function(data) {

                $('#postDiv').html(data);
            },
            error:  function(XMLHttpRequest, textStatus, errorThrown) {
                  alert(XMLHttpRequest);
                  alert(textStatus);
                  alert(errorThrown); 
            }             
          }
          $("#facesPhotoWrapper").photofy(myOptions);
          }, 1000);
      });
      var imageList = [];
/*imageList = ['http://blog.tremaynechrist.co.uk/Downloads/Faces/1.jpg','http://blog.tremaynechrist.co.uk/Downloads/Faces/2.jpg',
            'http://blog.tremaynechrist.co.uk/Downloads/Faces/3.jpg','http://blog.tremaynechrist.co.uk/Downloads/Faces/4.jpg',
            'http://blog.tremaynechrist.co.uk/Downloads/Faces/5.jpg','http://blog.tremaynechrist.co.uk/Downloads/Faces/6.jpg',
            'http://blog.tremaynechrist.co.uk/Downloads/Faces/7.jpg','http://blog.tremaynechrist.co.uk/Downloads/Faces/8.jpg',
            'http://blog.tremaynechrist.co.uk/Downloads/Faces/9.jpg','http://blog.tremaynechrist.co.uk/Downloads/Faces/10.jpg'
];*/
</script>

$dbhost2 = "localhost";
$dbuser2 = "root";
$dbpassword2 = "";
$db2 = "extjs_image";
$connection2 = mysql_connect($dbhost2,$dbuser2,$dbpassword2) or die (mysql_error());
mysql_select_db($db2,$connection2);  


$qry = "SELECT * FROM tbl_images ORDER BY RAND() LIMIT 5 ";         
$result = mysql_query($qry);

$myarray=array();
$str="[";

while ($row = mysql_fetch_assoc($result)){

     $str .= "'images/".$row['image']."',";
}
$str = substr($str,0,-1);
$str .="]";
/*['images/1_01.jpg','images/1_21.jpg','images/1_11.jpg','images/1_10.jpg','images/1_25.jpg'['images/1_01.jpg','images/1_21.jpg','images/1_11.jpg','images/1_10.jpg','images/1_25.jpg']
*/

?>

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T19:19:39+00:00Added an answer on May 21, 2026 at 7:19 pm

    Photofy isn’t currently designed for real-time image updates. This is basically because you never often stay on the page for large amounts of time, so images could change on page load. However I’m interested to add this option into Photofy later down the line.

    To get the effect of this, just submit a greater amount of images than what you actually want to display. In your imageList, submit 27 images for example. Now limit what is shown by setting the imagecount to 9.

    You can still randomise what images are sent to Photofy on every page load. Just get your php code to return a javascript file containing the array.

    var imageList = ['/Downloads/Faces/1.jpg','/Downloads/Faces/2.jpg','/Downloads/Faces/3.jpg']; //etc
    

    So you could now do…

    <div id="photofyWrapper"></div>
    
    <script type="text/javascript" src="ImageListGenerator.php"></script>
    <script type="text/javascript">
    var myOptions = {
    images: imageList,
    imagecount: 9
    };
    $("#photofyWrapper").photofy(myOptions);
    </script>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I try to get to a page straight from Bash at http://www.ocwconsortium.org/ . The
Try to download this page: http://www.4shared.com/get/B4AgMkcw/cookies.html I can use wget/firefox to get the whole
When I try to open a project's CodeAnalysis page I get the error An
I get this wired error only when I try to access the web page
When I try user = System.Web.UI.Page.CurrentUser or user = System.Web.UI.Page.User.Identity I get an error
when i try to do this and load the webforms page, i get this
Suppose I get, on a page, this simple html/script : <a id=hey href=#>try</a> var
Based on this question: How can I get HTML source code from TWebBrowser If
I have the following code snippet: $.getJSON(http://localhost:8080/images, function(data) { var items = []; $.each(data,
I try to get a page with curl from an IIS-Server which demands user

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.