Need Simple Java Apple... Help If You Know Java


New member
I just need a very simple java applet for a site. I know a little bit about java but not enough to pull this off myself.

I need a random image pulling app... but...

the site has 3 different images that must all be pulled... each with its own link.. all the sizes are the same... all from the same directory...

so the app needs to be able to get 3 different images along with the links for those images... need to make sure that all images are uniqe so it would have to check if any are the same and pull another one if needed...

seems pretty simple... sort of like does with 4 images...
Actually, thinking about it, this could really be done easily in PHP. Tell me if you want me to work on one for you.
var imagenumber = 5 ;
var randomnumber = Math.random() ;
var rand1 = Math.round( (imagenumber-1) * randomnumber) + 1 ;
images = new Array
images[1] = "IMAGE #1"
images[2] = "IMAGE #2"
images[3] = "IMAGE #3"
images[4] = "IMAGE #4"
images[5] = "IMAGE #5"
var image = images[rand1]
// -- End Hiding Here -->

put this where you want your image to be

<script language="JavaScript">
<!-- Hide this script from old browsers --
document.write('<IMG SRC="' + image + '">')
// -- End Hiding Here -->

<applet code="ET_RandomImage.class" align="BASELINE" width="118" height="94">
<!--The images.-->
<param name="B-1-Image" value="image/java3-41.jpg">
<param name="B-2-Image" value="image/java3-42.jpg">
<param name="B-3-Image" value="image/java3-43.jpg">
<!--The links.-->
<param name="B-1-URL" value="">
<param name="B-2-URL" value="">
<param name="B-3-URL" value="">
<!--New default values.-->
<param name="B-d-URLFrame" value="_self">
<param name="B-d-URLText" value="Click on the image.">
<!--White background.-->
<param name="BGColor" value="ffffff">

<script language="JavaScript">
Random Image Link Script

function random_imglink(){
var myimages=new Array()
//specify random images below. You can have as many as you wish

//specify corresponding links below
var imagelinks=new Array()

var ry=Math.floor(Math.random()*myimages.length)

if (ry==0)
document.write('<a href='+'"'+imagelinks[ry]+'"'+'><img src="'+myimages[ry]+'" border=0></a>')