NYCPHP Meetup

NYPHP.org

[nycphp-talk] Removing Text from an Input Box

Mark Armendariz lists at enobrev.com
Wed Jun 6 21:02:19 EDT 2007


>>	From: talk-bounces at lists.nyphp.org
[mailto:talk-bounces at lists.nyphp.org] On Behalf Of Ben Sgro (ProjectSkyline)
	 
	What im trying to do is turn that type to a password..so I can see
the text...is that possible.
	 


Yes it is possible to change a field type to text and then back to password
in Firefox, but you'll get errors from IE and opera.  They don't like the
idea of changing form field types.

The way I've gotten around this is by creating an new field (innerHtml),
using the old field's values, and then replacing the old field.  It's a lot
easier than it sounds using a framwork's insertion methods
(prototype::Insertion.Before), though shouldn't terribly difficult using
straight javascript.

Mark




More information about the talk mailing list