# My JS doesn't work uploaded, but does on localhost

**URL:** <https://forum.kirupa.com/t/my-js-doesnt-work-uploaded-but-does-on-localhost/173861>\
**Category:** Uncategorized\
**Created:** [December 30, 2005, 9:50am UTC](https://forum.kirupa.com/t/my-js-doesnt-work-uploaded-but-does-on-localhost/173861 "2005-12-30T09:50:59Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ben\_Smith](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/ben_smith/32/1118_2.png) [@Ben\_Smith](https://forum.kirupa.com/u/Ben_Smith)\
**Post date:** [December 30, 2005, 9:50am UTC](https://forum.kirupa.com/t/my-js-doesnt-work-uploaded-but-does-on-localhost/173861/1 "2005-12-30T09:50:59Z")

</div>

People. I’ve been doing some simple javascript for a website that I’m developing, and I don’t know where I have gone wrong.

```auto
function switchmember(mem,fullname,job){
div = document.getElementById('member');
div.innerHTML = '<h1>' + mem + '</h1>' + 'Full name: ' + fullname + '<br /> Position: ' + job;
image = document.getElementById(mem);
image.src = mem.toLowerCase() + '.png';
checknames();
image.name = "on";
}

function checknames(){
ben = document.getElementById('Ben');
ed = document.getElementById('Eddie');
nat = document.getElementById('Nat');
paul = document.getElementById('Paul');
tom = document.getElementById('Tom');
adam = document.getElementById('Adam');
if(ben || ed || nat || paul || tom || adam){
ben.name = null;
ed.name = null;
nat.name = null;
paul.name = null;
tom.name = null;
adam.name = null;
}
}

function dullimages(){
ben = document.getElementById('Ben');
ed = document.getElementById('Eddie');
nat = document.getElementById('Nat');
paul = document.getElementById('Paul');
tom = document.getElementById('Tom');
adam = document.getElementById('Adam');

ben.src = 'dullben.png';
ed.src = 'dulleddie.png';
nat.src = 'dullnat.png';
paul.src = 'dullpaul.png';
tom.src = 'dulltom.png';
adam.src = 'dulladam.png';
}

function shine(mem){
img = document.getElementById(mem);
img.src = mem + '.png';
}

function deshine(mem){
img = document.getElementById(mem);
if(img.name == null || img.name != "on"){
img.src = 'dull' + mem + '.png';
}
}

window.onload = function(e){
dullimages();
}

```

All the names (ben, ed…etc) are the names of the profile pictures.  
It’s meant to be a list of images which when you hover over them change to a lighter one so you can see them, and when you click on them it sets their name to “on” and they don’t go off on mouseout.

[http://pyxis.rnkhost.com/magnum/stuff](http://pyxis.rnkhost.com/magnum/stuff) \<-- The actual page
