View Full Version : display image in footer, please help

Jul 24th, 2005, 06:07 AM
How to display an image in footer only when a certain page is being visited?

I inserted an image in footer , and every webpage includes the footer, but I want it will be displayed only when a certain page is read, example, index.php.

How to make it with Javascript? please advise. thanks.

Jul 24th, 2005, 11:55 AM
window.onload = function() {
if ( /index\.php/.test(window.location) ) {
var img = document.createElement("img");
img.src = 'something.gif';
img.alt = "my image";
img.border = 0;
// find target parent