Jump to content

having the header change on refresh


Guest kaskudoo

Recommended Posts

Guest kaskudoo

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'

:)

Link to comment
Share on other sites

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:

Link to comment
Share on other sites

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>

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...