Hmmm. This is more complicated than I thought.
waseem, having 2 input fields doesn't seem correct. Thought it might
work I will have to pass that solution for this specific site.
Liam, Your code didn't work either, I don't know why.
Jörn, this watermark plugin is interesting but I don't want
ok,why not absolutely position some text on a password box and hide that
text on password box focus ?
On Tue, Oct 20, 2009 at 10:05 AM, Marco Barbosa
marco.barbos...@gmail.comwrote:
Hmmm. This is more complicated than I thought.
waseem, having 2 input fields doesn't seem correct. Thought it
For now, our project use two input elements to implement this, we still can
not get easier way.
Actually, not only password, but also text element, you need two inputs, one
hidden one shown.
Becoder.
On Tue, Oct 20, 2009 at 4:08 PM, waseem sabjee waseemsab...@gmail.comwrote:
ok,why not
either you ca maintain two input element (like facebook), or make an image
of passwordand set the image to textbox background, on focus or click
just remove the background-image.
On Tue, Oct 20, 2009 at 2:09 PM, Bi Jing beco...@gmail.com wrote:
For now, our project use two input elements to
You were right Waseem.
Specially after Bi Jing confirmed. I think that is the best way.
If it doesn't work I wil go for background like Rupak suggested.
Thank you all for your help!
On Oct 20, 1:55 pm, rupak mandal rupakn...@gmail.com wrote:
either you ca maintain two input element (like
I am experimenting around with other ways.the bad part about this is the a
browser will not allow you to change the type attribute - u suppose thats
for security purposes.
but ye - may be an absolutely positioned element over the text box can help
if you can get the z-indexing right to support IE.
strangest thing though - to get around faults like these. i coded my own
jquery select box...as its made of div tags you can;t give it a name
attribute. but you can still send the value through ajax or a query string.
On Tue, Oct 20, 2009 at 7:49 PM, waseem sabjee waseemsab...@gmail.comwrote:
I
Hi, another thing you can try is to use a label for the password input. Just
change the label styles to go on top of the input field ( it will look like
it is in the field.) Then when the input field has focus, hide the label so
it doesn't block the field. I just saw Waseem has the same idea.
// set the initial type to text
$(.mypasswordfield).attr({
type:'text'
});
// on user focus - change type to password
$(.mypasswordfield).focus(function() {
$(.mypasswordfield).attr({
type:'password'
});
});
// on user blur - change type to back to text
$(.mypasswordfield).blur(function()
Hi waseem!
Thanks for your reply.
Something's wrong with this line:
$(#password).attr({type:'text'});
I tried changing to:
$(#password).attr('type','text'});
but still no go.
I have to comment out to get the other JS stuff on the site working.
The rest of the code seems Ok. What could it be?
ah yes i forgot.
you would get access denied when tried to change an input type property
the best way is to have two input types and just hide one and show the other
but i have a solution for you
the html
!-- The following html of two input types - we gonna switch between
them--
Here is how I do it. Just markup the form like normal (I use a
definition list to lay out my forms)
$(input:password).each(function(){
var $currentPass = $(this)
$currentPass.css({opacity:0});
$currentPass.before('input type=text value=Password
class=removeit
Instead of replacing the input, display a label above it. See
http://wiki.jqueryui.com/Watermark
Jörn
On Mon, Oct 19, 2009 at 4:17 PM, Liam Potter radioactiv...@gmail.comwrote:
Here is how I do it. Just markup the form like normal (I use a definition
list to lay out my forms)
13 matches
Mail list logo