I'm currently styling my username/password inputs on a webpage. They are working as intended in Firefox/Safari, but Internet Explorer throws the following error:
Line: 7, Char: 2, Objected required
It happens when I give focus to my inputs. This function is called onfocus:
function InputFocused(InputID)
{
var InputObject = document.getElementById(InputID);
DefaultValue = InputObject.value;
InputObject.value = "";
InputObject.style.color = "#000";
}
And this is the markup:
<input type="text" class="login" id="username" value="USERNAME" onfocus="InputFocused(this.id)" onblur="InputBlurred(this.id)" />
I thought this was pretty straightforward, but I have extremely little experience with JavaScript, so any insight would be appreciated.