| Web Design and Hosting Creating sites, scripting, and hosting discussions. |
| Post Reply | New Thread | Subscribe |
|
|
Thread Tools |
![]() Member Since: Apr 08, 2004
Posts: 127
![]() |
I use the following JS for a simple but effective image randomizer:
Code:
<SCRIPT LANGUAGE="JavaScript"> <!-- Hide from old browsers iArray=new Array( "images/index_image1.jpg", "images/index_image2.jpg", "images/index_image3"); ri=Math.floor(iArray.length*Math.random()); ri='<IMG SRC="'+ iArray[ri]+ '" BORDER=0>'; // end hiding --></SCRIPT> Code:
<SCRIPT language="JavaScript"> <!-- document.write(ri); // --> </SCRIPT> Basically what I'm getting at is that I have a cell with the random image code applied to it, but the cell expands horizontally the fill the browser window. Because each of the main images is a finite width, I'm left with a rather large and ugly gaping hole to the right of the image when a user expands their browser. To work around that, I'd like to create a repeating background image for that cell that would give the appearance of the image continuing to the right. Problem is, I have no idea what the code would be to match up each random "main" image with its background image, so that when the main one is randomly displayed the background image would match. I'd be ridiculously grateful if anyone could help me out here. Thanks, m19 |
| QUOTE Thanks | |
| Post Reply | New Thread | Subscribe |
| Thread Tools | |
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
|
|
|||||||
Thread |
Thread Starter |
Forum |
Replies |
Last Post |
| OSX SERVER 10.0.3 AND G4 Dual Processor incompatible? | Bailyflah | OS X - Operating System | 4 | 01-27-2007 05:07 PM |
| cd image | komo | Switcher Hangout | 0 | 06-02-2006 03:30 AM |
| Image rotation destroys EXIF info -- help! | djmitch | Images, Graphic Design, and Digital Photography | 5 | 09-10-2005 06:52 PM |
| dual 1.8G or 2G? | digisam | Apple Desktops | 4 | 02-19-2005 09:46 AM |
| dual 1.25 powermac g4....worth it? | jonmichael23 | Apple Desktops | 1 | 01-26-2004 01:42 AM |
All times are GMT -4. The time now is 09:15 AM.
Powered by vBulletin