WeberDev.com PHP and MySQL Code

LOG IN
BEGINNER GUIDES  |  PHP CLASSES  |  CODE SEARCH  |  ARTICLES SEARCH  |  PHP FORUMS  |  PHP MANUAL  |  PHP FUNCTIONS LIST  |  WEB SITE TEMPLATES
Start typing to search for PHP and MySQL Code Snippets and Articles Search
Submit a code Example / Snippet Submit Your Code
Search Engine Optimization Monitor SEO Monitor
Web Site UpTime Monitor UpTime Monitor
WeberDev's Monthly code contest PHP Code Contest
Your Personal Examples List My Favorite Examples
Your Personal Articles List My Favorite Articles
Edit Account Info Update Your Profile
PHP Code Search
Web Development Forums
Learn MySQL Playing Trivia
PHPBB2 Templates
Web Development Index
PHP Web Logs (BLogs)
Web Development Resources
Web Development Content
PHPClasses
PHP Editor
PHP Jobs
Vision.To Design
Ajax Tutorials
PHP Programming Help
PHP/MySQL Programming
Webmaster Resources
Webmaster Forum
XML meta language
website builder
Forex Trading Online forex trading platform

Go Back Add a Comment Send this example to a friend Add this Article to your personal favoritest for easy future access to your favorite Code Examples and Articles. Submit a code example Print this code example.
BACK ADD A COMMENT SEND TO A FRIEND ADD TO MY FAVORITES ADD CODE EXAMPLES PRINT
Title : Image Flipper
Categories : Java Script, Graphics
Boaz Yahav
Date : Aug 29th 1998
Grade : 2 of 5 (graded 3 times)
Viewed : 10256
File : No file for this code example.
Images : No Images for this code example.
Search : More code by Boaz Yahav
Action : Grade This Code Example
Tools : My Examples List

  Submit your own code examples 
 

Flipper(width,height,imageList)
FlipperLong(width,height,speed,imageList)

width,height: the image width, height (use -1 for non-fixed)
imageList A string containing a list of space seperated images
speed Number of milli seconds between flips (default 5000 - 5 seconds)

Include flipper.txt in the HEAD section of you document.
Add a function call inside your document:

<script language="javascript">
Flipper(152,136,"dog2-small.gif condo-view-small.gif hiking1-small.gif
hiking2-small.gif malanda-small.gif snowball-small.gif snowcamping-small.gif
spider1-small.gif spider3-small.gif ");
</script>
<br>

flipper.txt
===========

<SCRIPT language="javascript">
<!-- Sheilds up
// Image Flipper - Cameron Gregory - cameron@bloke.com
// http://www.bloke.com/
// http://www.bloke.com/javascript/Flipper/
// http://www.bloke.com/javascript/Flipper/link.html

function changeImage(r,i)
{
r.src=i;
}

function goFlipURL()
{
document.location = urlSet[currentFlip];
}

function flipFlipper(imageSet,speed)
{
currentFlip ++;
if (currentFlip == imageSet.length)
currentFlip=0;
changeImage(document.flip,imageSet[currentFlip]);
setTimeout("flipFlipper(imageSet,speed)", speed)
}

function FlipperLong(width,height,s,images)
{
/* si: start index
** i: current index
** ei: end index
** cc: current count
*/
speed = s;
si = 0;
ci=0;
cc=0;
imageSet = new Array();
ei = images.length;
for (i=1;i<ei;i++) {
if (images.charAt(i) == ' ') {
imageSet[cc] = images.substring(si,i);
cc++;
si=i+1;
}
}
currentFlip = 0;

document.write("<img name='flip'");
if (width >0)
document.write("width="+width);
if (height >0)
document.write(" height=" +height);
document.writeln(" src=" +imageSet[0]+ ">");

setTimeout("flipFlipper(imageSet,speed)", speed)
}

function Flipper(width,height,images)
{
speed=5000;
FlipperLong(width,height,speed,images);
}


function FlipperLinkLong(width,height,s,images,urls)
{
/* si: start index
** i: current index
** ei: end index
** cc: current count
*/
speed = s;
imageSet = new Array();
urlSet = new Array();

si = 0;
ci=0;
cc=0;
ei = images.length;
for (i=1;i<ei;i++) {
if (images.charAt(i) == ' ') {
imageSet[cc]= images.substring(si,i);
cc++;
si=i+1;
}
}

si = 0;
ci=0;
ccu=0;
ei = urls.length;
for (i=1;i<ei;i++) {
if (urls.charAt(i) == ' ') {
urlSet[ccu]= urls.substring(si,i);
ccu++;
si=i+1;
}
}

currentFlip = 0;

document.write("<a href=\"javascript:goFlipURL()\"><img name='flip'");
document.write("<img name='flip'");
if (width >0)
document.write("width="+width);
if (height >0)
document.write(" height=" +height);
document.writeln(" src=" +imageSet[0]+ "></a>");

setTimeout("flipFlipper(imageSet,speed)", speed)
}

function FlipperLink(width,height,images,urls)
{
speed=5000;
FlipperLinkLong(width,height,speed,images,urls);
}

// sheilds down -->
</SCRIPT>



This is a script that list all image files on a given directory, and displays the thumbnails nicely formated within an HTML table. It also make use of JavScript to open pop up windows when the users want to see the full photo.
Categories : Graphics, PHP, Complete Programs, Java Script
Random Image
Categories : Java Script, Graphics
JAVASCRIPT interface class to the eBusiness Charts generatation remote service.
Categories : Java Script, Graphics, Charts and Graphs
A ball is attached to your mouse cursor with an elastic cord!
Categories : Java Script, DHTML, Graphics
Create Thumbnails - resize an image - jpeg, jpg, gif, png to the specifed width and height in proportion without loosing out on pixcel quality.
Categories : PHP, GD image library, Graphics
Zephyr: AJAX Based Framework for PHP5 Developers
Categories : PHP, AJAX, Frameworks, Java Script, Web Applications
AJAX XML HTTP Request - Compatible with almost browsers!
Categories : AJAX, HTTP, Java Script
javascript doesn't accept a fieldname with []
Categories : Java Script
Array values from javascript to php
Categories : PHP, Java Script, Arrays
Create HTML forms dynamicly using Javascript & PHP
Categories : PHP, PHP Classes, Java Script
Linked comboboxes with php-mysql & javascript
Categories : PHP, Java Script, Databases, MySQL
Random Image Display
Categories : PHP, Filesystem, Graphics, HTML and PHP
The toll booth
Categories : PHP, Java Script, Filesystem
MD5 secured login
Categories : PHP, Java Script, Authentication, Security
Flash Detection Script with loads of features
Categories : Java Script, Flash