Recommendations on a "pic of the day" java app for web page?

S
Posted By
spectre
Jun 5, 2004
Views
432
Replies
4
Status
Closed
TIA

How to Master Sharpening in Photoshop

Give your photos a professional finish with sharpening in Photoshop. Learn to enhance details, create contrast, and prepare your images for print, web, and social media.

MR
Mike Russell
Jun 7, 2004
wrote:
TIA

Google for javascript random.

This was not written by me, but was posted by Joe Greene some time ago in a different news group.

/*
Try this. I wrote a function to generate a random number: */
function Roll_Die(DSize){
var DRoll=0;
for (I=0;I<DSize;I++){
DRoll+=Math.round(Math.random());
} return DRoll
}
/*
Now Given the use of the above function, create an array of image filenames
*/
var MyImages=new Array();
MyImages[0]="foo.gif";
MyImages[1]="bar.jpg";
MyImages[2]="foo-bar.gif";

/*
Next assuming you are manipulating the first image on your page call this function to randomly change pictures.
*/
function RandomPix(){
var P=Roll_Die(MyImages.length);
document.images[0].src="http://my.server.com/my/imge/folder/"+MyImages[P];

}
/*
You can call the function in onLoad= to only select at load time, or you can create another function with a setInterval() calling itself to randomly change images periodically. Note: if your going to change images at intervals it’s recommened to create a hidden layer which loads them all, in order to minimize the lage when it changes pictures…. */


Mike Russell
www.curvemeister.com
www.geigy.2y.net
T
tacitr
Jun 7, 2004
Google for javascript random.

This was not written by me, but was posted by Joe Greene some time ago in a
different news group.

The problem with a randomizer like this is that it must be hard-coded with the names of the images, and it increases the size of the HTML file (significantly, if there are many images).

I have written a Perl random image CGI which allows you to dump images into a folder on the server, and grabs one of the images from that folder at random; in order to use it, you must (of course) have a Web host which permits you to use CGI scripts. It’s freeware, and available for download from my Web site at

www.xeromag.com/fvshare.html


Biohazard? Radiation hazard? SO last-century.
Nanohazard T-shirts now available! http://www.villaintees.com Art, literature, shareware, polyamory, kink, and more:
http://www.xeromag.com/franklin.html
NS
Nicholas Sherlock
Jun 7, 2004
Tacit wrote:
Google for javascript random.

This was not written by me, but was posted by Joe Greene some time ago in a
different news group.

The problem with a randomizer like this is that it must be hard-coded with the names of the images, and it increases the size of the HTML file (significantly, if there are many images).

I have written a Perl random image CGI which allows you to dump images into a folder on the server, and grabs one of the images from that folder at random; in order to use it, you must (of course) have a Web host which permits you to use CGI scripts. It’s freeware, and available for download from my Web site at

www.xeromag.com/fvshare.html

The .zip link points to the .sit file :).

Cheers,
Nicholas Sherlock
T
tacitr
Jun 8, 2004
The .zip link points to the .sit file :).

Whoops! So it does. It’s fixed now.


Biohazard? Radiation hazard? SO last-century.
Nanohazard T-shirts now available! http://www.villaintees.com Art, literature, shareware, polyamory, kink, and more:
http://www.xeromag.com/franklin.html

Master Retouching Hair

Learn how to rescue details, remove flyaways, add volume, and enhance the definition of hair in any photo. We break down every tool and technique in Photoshop to get picture-perfect hair, every time.

Related Discussion Topics

Nice and short text about related topics in discussion sections