javascript onblur/onfocus function not working
<p>I have the following two html form inputs:</p>

<pre><code>&lt;input type="text" class="faded" name="mobile" value="012-245-6789" onfocus="hideDefault(this)" onblur="showDefault(this)"/&gt;
</code></pre>

<p>and </p>

<pre><code>&lt;input class="faded validation_required" type="text" name="dob" value="MM/DD/YYYY" onfocus="hideDefault(this)" onblur="showDefault(this)"/&gt;
</code></pre>

<p>and the following javascript:</p>

<pre><code>function hideDefault(input)     
{
if(input.name == "dob")
{
    if (input.value == "MM/DD/YYYY")
    {
        input.value = "";
        input.style.color = "black";
    }
}
else if(input.name == "mobile")
{
    if (input.value == "012-345-6789")
    {
        input.value = "";
        input.style.color = "black";
    }
}
    else
{input.value ="hello";}

}
function showDefault(input)
{
if(input.name = "dob")
{
    if (input.value == "")
    {
        input.value = "MM/DD/YYYY";
        input.style.color = "#A3A3CC";
    }
}
else if(input.name == "mobile")
{
    if (input.value == "")
    {
        input.value = "012-345-6789";
        input.style.color = "#A3A3CC";
    }
}

}
</code></pre>

<p>The "dob" input is working fine, when you click on it the default text disappers and when you move off it it comes back. But its not working for the first one, the "mobile" one. Why is this?</p>
