浏览器自动完成/保存的表单在 ajax 请求中不起作用 [英] browser autocomplete/saved form not work in ajax request

查看:22
本文介绍了浏览器自动完成/保存的表单在 ajax 请求中不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

很难在搜索引擎中搜索关于此的任意关键字组合,因为大多数流行的开发人员都使用它希望通过 ajax 自定义自动完成.

Its really hard to search the any combination of keywords in search engine about this because it used by most popular developer wanted a custom autocomplete by ajax.

大多数开发人员搜索有关自定义自动完成以通过 ajax 从 db 获取结果或出于安全原因如何禁用浏览器自动完成或他们想使用其他自动完成扩展程序的搜索.

Most developer search about the custom autocomplete to get result from db by ajax or about how to disable browser autocomplete due to security reason or they wantted to use another autocomplete extender.

但是我不是在谈论自动完成.我发现简单的普通浏览器自动完成或浏览器保存的 IE 或 FF 表单在填充文本框中的文本时会像下拉最近的选择一样.

However I am not talking about the autocomplete. I finding about simple normal browser autocomplete or browser saved form either IE or FF that will act like dropdown recent choice during filling a text in a textbox.

在登录表单中填写用户名和密码等表单简单而正常.表单提交后(表单数据发布)浏览器将保存自动完成或 FF 中的事件将要求与密码一起保存.

It simple and normal filling a form like username and password in a login form. After the form submitted (the form data post) browser will save the autocomplete or event in FF will ask to save along with the password.

现在,考虑通过ajax提交的登录.表单数据不会被 IE 或 FF 自动保存,因为表单不是通过 post 方法发送的.我很确定这是因为 ajax vs post 方法.

Now, think about the login submitted via ajax. The form data not automatically saved by either IE or FF simply because the form not sent by post method. I am pretty sure it is because of ajax vs post method.

像 DotNetNuke 这样的 CMS 使用这种方式,我真的很难为开发目的输入 5 个用户登录的用户名和密码,事件我想让用户在没有任何自定义或扩展程序的情况下在浏览器中保存他们自己的表单数据.再举一个例子,用户可以看到并使用相同的电子邮件来填写跨网站或域的任何电子邮件表单.

CMS like DotNetNuke using this way and its really hard to me to type username and password for 5 user login for development purpose, event I want to let user save their own form data in the browser without any custom or extender. By another example, user can see and use same email to fill an any email form across web site or domain.

如何解决这个问题?您有什么建议更适合搜索的关键字吗?

How to workaround with this? Did you have suggestion what keywords is more suitable to search?

CallMeLaNN

推荐答案

我遇到了同样的问题.我能够通过添加一个隐藏的 iframe 来为 FireFox 解决这个问题,我在做我的 AJAX 帖子之前通过 JavaScript 提交了这个 iframe.我仍然没有找到任何适用于 Chrome/IE 的东西.

I'm having the same problem. I was able to solve it for FireFox by adding a hidden iframe that I submit via JavaScript before doing my AJAX post. I still haven't found anything that works in Chrome/IE.

这篇关于浏览器自动完成/保存的表单在 ajax 请求中不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆