onBlur problems

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
Trahb
Forum Commoner
Posts: 36
Joined: Sat Jan 30, 2010 9:09 pm

onBlur problems

Post by Trahb »

Basically, all you need to know is that I have a login box with Username and Password inputs. Each has the same background image, but when I blur Username (click somewhere else on the page ONLY) the Password's background color changes to a crappy yellow background. This doesn't happen if I go directly from the Username to the Password textbox. I've tried lots of different things. What I currently have is this :

Code: Select all

function change(id) { 
identity=document.getElementById(id); 
identity.style.backgroundImage='http://addicted.servebbs.com/maplereflex2/webroot/images/login_input.png'; 
}
Also, instead of

Code: Select all

identity.style.backgroundImage='http://addicted.servebbs.com/maplereflex2/webroot/images/login_input.png'; 
I've tried

Code: Select all

function change(id, newClass) { 
identity=document.getElementById(id); 
identity.className(newClass); 
 
Not sure why it still doesn't keep the normal background image when I blur the Username textbox.. any ideas?
Post Reply