Get value of password field in internet explorer with a placeholder

vvenomouss

New Member
Pardon my haml/coffeescript but my HTML looks like this:\[code\]%input.login-email{:type => "textbox", :placeholder => "Email address"} %input.login-password{:type => "password", :placeholder => "Password"}\[/code\]It's basically a input field. Email is a \[code\]textbox\[/code\] and password is type \[code\]password\[/code\]. Both of them have a placeholder. But when I do:\[code\]email = $(".login-email").val()password = $(".login-password").val()\[/code\]Email is correct and grabs the email in the input field. But for the password, it always grabs the placeholder instead of the password typed in. So in this case,\[code\]@$(".login-password").val()\[/code\]always returns "Password" no matter what I type in. And this only happens in IE. It works perfectly in Chrome and FF.I might just write a custom placeholder JavaScript code to deal with this if no one else has any easy solution to deal with this.
 
Back
Top