Guest kaskudoo Posted November 21, 2006 Share Posted November 21, 2006 hey folks, on my homepage i have the header DIV being an include - this way i can easily change it on all pages with just one edit. i put the same thing on my shop homepage - the same content that is and no include. now i want to have the content (which is text right now, but soon also to be pictures) to change on every page, either related to the page or just randomly with a refresh of the page. i actually have not looked for a mod of that yet - i think it can be easily done though, if it just is to randomly take an include file or so? if someone has done it before, i would be thankful for guidance my store is here and the according DIV is called 'topbox' :) Quote Link to comment Share on other sites More sharing options...
Guest Posted November 21, 2006 Share Posted November 21, 2006 I had one done and used images in a box that changed on every page or when refreshed in the header area. Try with Convict in .org forum, he helped me out with that one :rolleyes: Quote Link to comment Share on other sites More sharing options...
roban Posted November 21, 2006 Share Posted November 21, 2006 Here is a random image generator I've used in the past. It's java and you'll have to configure it for your needs. <!-- TWO STEPS TO INSTALL RANDOM IMAGE: 1. Copy the coding into the HEAD of your HTML document 2. Add the last code into the BODY of your HTML document --> <!-- STEP ONE: Paste this code into the HEAD of your HTML document --> <HEAD> <script LANGUAGE="JavaScript"> <!-- Begin // Set up the image files to be used. var theImages = new Array() // do not change this // To add more image files, continue with the // pattern below, adding to the array. theImages[0] = '1.gif' theImages[1] = '2.gif' theImages[2] = '3.gif' theImages[3] = '4.gif' // do not edit anything below this line var j = 0 var p = theImages.length; var preBuffer = new Array() for (i = 0; i < p; i++){ preBuffer = new Image() preBuffer.src = theImages } var whichImage = Math.round(Math.random()*(p-1)); function showImage(){ document.write('<img src="'+theImages[whichImage]+'">'); } // End --> </script> </HEAD> <!-- STEP TWO: Copy this code into the BODY of your HTML document --> <BODY> <script LANGUAGE="JavaScript"> <!-- Begin showImage(); // End --> </script> Quote Link to comment Share on other sites More sharing options...
Guest kaskudoo Posted November 22, 2006 Share Posted November 22, 2006 cool - as soon as i have some nice images, i will give it a go :rolleyes: Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.