> "I don't believe this can be done. Are you just seeking to hide the
> field
> Contents when focused?"
> Hi,
> Exactly. The design of the site I am working on calls for a couple of
> form fields with initial values of UserName and PassWord.
Ohhh... that explains it ... They wanted the user to see the fields
pre-populated with text and then have to enter some value into them, but
mask the password field...
probably better not to pre-populate the fields and just make sure they're
well labelled... though if you need to do something like this, you don't
necessarily have to change the type of the field... What you could do is use
two separate fields with the first one being a name-less dummy field...
<input type="text" name="dummy" value="Password"
onfocus="getPasswordField();">
<input type="password" name="password" style="display:none;">
<script language="javascript">
function getPasswordField() {
document.myform.dummy.style.display="none";
document.myform.password.style.display="inline";
document.myform.password.focus();
}
</script>
Very simple and the user would never know the difference. :)
Isaac Dealey
Certified Advanced ColdFusion Developer
www.turnkey.to
954-776-0046
______________________________________________________________________
Get the mailserver that powers this list at http://www.coolfusion.com
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists