View Full Version : display image in footer, please help

07-24-2005, 05: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.

07-24-2005, 10: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