reddem0n
03-22-2010, 08:11 PM
So I have a username and password field with the onfocus onblur script.
Basically what happens is
1) When you first load the page - You will see Username and Password typed in already in the two form fields.
2) When you click on the username, the username type disappears and you are able to type in your username. Same thing happens with the password.
3) The problem is - On Firefox and Chrome both work out the way they are supposed too. However, on IE 8 - When you tab over to the password field, it gives me a JS error.
Webpage error details
Message: Could not get the type property. This command is not supported.
Here is my code:
<input class="search_textbox" value="Username" NAME="username" type="text" onfocus="clearText(this)" onblur="clearText(this)" />
<input class="search_textbox" type="text" name="password" value="Password" onFocus="if(this.value='Password'){this.value='';this.type='password';}">
<input type="submit" value="Login" class="search_button" />
Any help would be appreciated.
Basically what happens is
1) When you first load the page - You will see Username and Password typed in already in the two form fields.
2) When you click on the username, the username type disappears and you are able to type in your username. Same thing happens with the password.
3) The problem is - On Firefox and Chrome both work out the way they are supposed too. However, on IE 8 - When you tab over to the password field, it gives me a JS error.
Webpage error details
Message: Could not get the type property. This command is not supported.
Here is my code:
<input class="search_textbox" value="Username" NAME="username" type="text" onfocus="clearText(this)" onblur="clearText(this)" />
<input class="search_textbox" type="text" name="password" value="Password" onFocus="if(this.value='Password'){this.value='';this.type='password';}">
<input type="submit" value="Login" class="search_button" />
Any help would be appreciated.
