问题标签 [jqueryform]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
0 回答
679 浏览

jquery - jQuery AjaxSubmit 总是触发错误(但仍然提交)

我使用 jQueryForm 插件来提交我的表单。我在 CodeIgniter 中有它,所以当我提交表单时,它会运行回调以检查是否重复。如果有,它会加载一个带有标题 401 的视图,如果没有 - 加载普通视图。

我将此代码用于JS:

现在一直触发error,但是数据还在提交中。有趣的是,我还有其他功能,几乎相同,并且有效。唯一的区别是,我在beforeSubmit那里使用,但在这里我看不到任何意义。

这会是什么?

0 投票
5 回答
21840 浏览

jquery - Jquery Mobile中如何定义文本区域的高度和宽度?

在输入之前,输入字段是预定义的大小(屏幕宽度上的两行)..:( 它没有采用我在行和列值中定义的任何内容.. 例如:输入字段仍然是固定的...显示没有变化.

逐渐地,随着我们引入文本,输入字段的高度增加,以查看整个引入的文本。

但我需要的是定义我自己的 textfeild 的高度和宽度......如果输入的文本更多,那么 feild 应该逐渐增加。

我正在使用的代码是:

0 投票
1 回答
886 浏览

wcf - Upload file async issue with jQuery forms to a WCF service

I need to wrap this up but not sure how :-)

Basically, I'm using jQuery forms to upload a file to a WCF REST service.

Client looks like:

While server relevant snippets are

Problem is that what I write to disk looks like this, not the content of the file (in my case, "0123456789"):

Question - should I be manually parsing what I get above and extract the last part which corresponds to the uploaded file (not elegant)? Or there is a way to apply attribute, content type, whatever setting, in order to get in the stream JUST the uploaded file's content?

I'm suspect there is, but I'm missing it... any help?

Thanks much!

0 投票
1 回答
191 浏览

forms - jquery序列化方法不适用于表单

我正在尝试使用 jquery ajax 提交表单。

我的jq代码是这样的:

它只是简单地包含一个文本区域,我尝试提醒它的值,但那里什么都没有,然后我删除了所有 div 元素,仍然没有。

能否请您给我一些建议,提前谢谢。

0 投票
1 回答
1671 浏览

jquery - jquery移动输入文本字段帮助文本或弹出

Jquery Mobile 中的表单输入元素是否支持“帮助文本”或弹出链接?

这一定是一个常见问题,我想知道是否已经有开箱即用的支持。

谢谢。

0 投票
1 回答
1036 浏览

jquery - jquery表单插件json不能正常工作

我正在使用 jquery 表单插件上传图片,一切顺利。我遇到的问题是关于 php 脚本从服务器发送的 json 响应。

我正在使用 jquery 1.8.0

为什么我在尝试访问 (xhr.responseText["success"]) 时会出现未定义?我希望得到真或假以及 .imgContainer 的值

也许它没有将其解释为 json。我该如何解决这个问题?

0 投票
1 回答
1287 浏览

jquery - 使用 jquery 表单的自动文件上传提交在 IE 中引发访问被拒绝错误

我正在使用jquery 表单上传图像而无需刷新页面。以下是html标记:

这在 Firefox 和 Chrome 中运行良好,但在 IE 8 和 9 中,它会抛出拒绝访问错误。有什么解决办法吗?或者在不刷新页面的情况下上传图像的任何替代方法?

0 投票
0 回答
1103 浏览

jquery - 使用 jquery.validate.js 和 jquery.form.js 检查条件

在我的表格中,有很多字段,包括国家、州。

在国家下拉列表中列出的所有国家,当我选择美国时,它将在状态下拉列表中显示其状态(这里stateid是状态下拉列表的 ID)。

如果我选择其他国家,则会显示一个用于输入状态的文本框,并且下拉菜单将不显示(这里statename是状态文本框的 id)。

我还使用 jquery.validate.js 和 jquery.form.js 将验证放在此页面中。

以上是我的验证码..

我想检查 stateid(如果国家是US并且stateid显示下拉菜单)是一个必填字段。并且想要检查 statename(如果没有显示国家USstatename文本框)是必填字段。

我怎样才能做到这一点?

编辑:

这是html:

0 投票
6 回答
3987 浏览

javascript - javascript:如果所有文本字段都为空,则阻止提交?

我正在使用这个 javascript 来禁用我的表单提交按钮,直到用户在 textarea 字段中输入。一旦填充了文本区域,提交按钮就不再被禁用。

然而,虽然这适用于单个文本区域,但我现在想找到一种方法来完成这项工作,这样如果我有四个文本输入字段,那么保持禁用提交按钮,直到它们都不是空的/没有填充文本。

这是我目前使用的内容:

但是现在我在表单中添加了更多的文本输入字段,所以我需要脚本来禁用我的提交按钮,直到所有文本字段都被填充,有人可以帮我吗?

我想将这些文本字段添加到我的表单中:

0 投票
1 回答
222 浏览

asp.net-mvc - Submit an array to an ASP.NET MVC applictaion using jQuery.Form

I'm using jQuery.Form plugin to submit an array to an ASP.NET MVC (4) application.

Let's say I have an array:

Submitting that array using jQuery.Form plugin that array will be sent as:

(when using form-url-encoded content type)

But ASP.NET MVC does not understand that, to make MVC understand that I need to send either:

(include index)

or

(no square brackets)

I can't submit as JSON because along with array and other data I also submit files.

Question: is there a way to either configure jQuery.Form to send arrays in a different format, or to teach ASP.NET MVC to understand item[] format?