EasyUI Forum
April 18, 2024, 07:11:29 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Textbox browser's autofill  (Read 17444 times)
jgautier
Newbie
*
Posts: 20


View Profile
« on: August 23, 2014, 08:33:24 AM »

Hi,

When I use textboxes inside my login forms, some browsers don't suggest to save/remember login and password as they do when I use standard textfields.
On MacOS, Firefox (30) works correctly, but Chrome (36.0.1985.143) don't, neither Safari (7).

thanks a lot for looking at this issue.

JG
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: August 24, 2014, 03:35:07 AM »

The textbox input has autocomplete disabled. To enable it, please try this:
Code:
$('#tb').textbox('textbox').attr('autocomplete', 'on');
Logged
jgautier
Newbie
*
Posts: 20


View Profile
« Reply #2 on: August 24, 2014, 09:56:24 AM »

thanks for your answer, but I'm not sure that is the problem.

(my english is not very good, sorry...)

I talk about browser's autofill function : on a web page, when you fill some fields to login, the first time your browser asks you if you want it to keep and remember these values and automatically recover them next times. When you come back to the same page, form fields are automatically filled by the browser with stored values.

Since I use easyui textboxes in my login form, instead of standard html textfields, this function don't work correctly (using Chrome neither Safari on MacOS X).

Please tell me if I'm right or if I've misunderstood something.

thanks,

JG
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #3 on: August 25, 2014, 01:39:10 AM »

The textbox component rewraps the input element. The auto filling feature may not work well in some browsers. The solution to solve your issue is to use the native input element instead, or wait a little time to create the textbox components.
Logged
jgautier
Newbie
*
Posts: 20


View Profile
« Reply #4 on: August 25, 2014, 03:19:59 AM »

All right, thanks.
But what do you mean by "or wait a little time to create the text box components" ?

JG
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #5 on: August 25, 2014, 06:16:04 AM »

Suppose you have a form defined as:
Code:
<form action="test.php" method="post">
<div id="cc" style="display:none">
<input id="uid" name="uid" style="width:100px">
<input id="pwd" name="pwd" type="password" style="width:100px">
<input type="submit" value="Submit">
</div>
</form>
When the page is loaded successfully, delay creating the textbox components.
Code:
<script type="text/javascript">
$(function(){
setTimeout(function(){
$('#cc').show();
$('#uid,#pwd').textbox();
},1000)
})
</script>
« Last Edit: August 25, 2014, 06:17:42 AM by stworthy » Logged
jgautier
Newbie
*
Posts: 20


View Profile
« Reply #6 on: August 27, 2014, 12:33:52 AM »

Thanks : I've understood now.

JG
Logged
jgautier
Newbie
*
Posts: 20


View Profile
« Reply #7 on: November 22, 2014, 06:36:56 AM »

Hello,

I've tried to use delay, but it doesn't seem to work.

JG
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!