问题标签 [ajax-request]

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 投票
1 回答
634 浏览

php - xmlhttp.responseText after second ajax request

i m writing a script using javascript ajax request and php.. i make an ajax call to verify that a user is recognised or not and according to the "response" i want to make a second ajax request either letting him either make his choices if his is already a registered user, or display the already submitted choices

on my php side

i have these lines in case he is recognised

but if he is not recognised i have set this check

the first call is made passing only the string is set ""

while on the second call string is set as option1=A&option2=B etc etc...

the issue is, that i try to alert the xmlhttpresponse to check if the response has been altered, but the resposne remains the same..for instance if he is not recognised i ll get in both responses "nodata" while if i refresh the page and he is recognised, i ll get the document.getElementById('".$row['option1']."').className += ' colour1'; response..

the reason i need this is because i want this part

to be executed only if he is recognised..

0 投票
2 回答
246 浏览

wicket - Wicket 应用程序中的预加载器

在搜索事件的检票口应用程序中,需要几秒钟甚至几分钟的时间才能将结果显示为长数据。我想在从数据库中获取数据时显示一个预加载器,以让用户在单击 search 时知道正在发生的事情。我对 wicket 应用程序很陌生,不太了解这些东西,但我发现 AjaxLazyPreloader 但正如我所说,我想在调用搜索方法时显示预加载器......我正在分享 SearchSubmit 方法......

我想当这个方法被调用直到它获取结果数据的时候,它应该显示一个预加载器或微调器。任何人都可以建议如何做到这一点.??

0 投票
1 回答
1480 浏览

jquery - multiple jquery fancyBox

I want to close fancyBox then immediately open new fancy box. But it didn't happen.

What actually happens is, it first displays alert and then closes the fancy boxes.

0 投票
1 回答
70 浏览

asp.net-mvc-3 - 如何使用 AjaxResponse.Render() 替换 MVC 中的 span 文本?

我正在使用 AjaxResponse.Render() 替换 2 个 div,它们有 2 个关联的部分视图。

但是有一个像下面这样的跨度:

我也需要替换这个值。如何调用 with AjaxResponse.Render() 来替换这个值?

此跨度没有关联的视图。这可能很容易,但我无法让它发挥作用。

我试过这些:

注意第二个参数是视图名称。

这些都不起作用。我不想创建局部视图,除非它是唯一的方法。

谢谢

0 投票
0 回答
185 浏览

extjs - sencha touch 2 - 使用 wordpress 帐户登录

我需要制作 sencha touch 2 应用程序来执行 3 项任务:
1 - 从 word press 网站获取 bolgs 提要(完成)
2 - 使用我的 word press 帐户登录并能够编写新博客(正在处理它)
3 - 搜索同一个网站。

我正在处理我已经完成登录表单并完成的第二个任务,Ajax.request但我不知道它是否运作良好,我需要知道我是否能够完成这项工作(登录并写新博客) ? 如果是这样,有人可以指导我学习任何对我有帮助的教程。
谢谢你。

更新:这是登录功能的代码

0 投票
7 回答
9775 浏览

html - Ajax 加载器未在 chrome 中显示

我正在为 ajax 调用使用 ajax 加载程序(如请稍候 .gif 图像)图像。在几天之前,它可以完美运行并以 chrome 显示。

我没有看到图像有任何问题,或者我们没有更改它。它在 IE、Mozilla 和其他浏览器中正确显示,但我不明白为什么它没有在 chrome 中显示。

我看过Ajax Loader Not Showing in Google Chrome但没有得到任何帮助。

html标记是

divajaxProgress将在出现 ajax 调用时显示,一个简单的示例是页面加载。这里是函数

你可以在这里看到图片

请建议我这里有什么问题。

0 投票
2 回答
569 浏览

yii - Yii:如何将 JMultiSelect 小部件选定值发送到控制器

我使用了一个小部件 JMultiSelect,我希望当我按下 ajax 按钮(ajax 请求)时,我选择的值将发送到控制器。我希望将值添加到我的请求的“数据”中。

这是我的小部件:

我试过这样的事情:

找到了解决方案,但现在我有了价值而不是文字:

0 投票
2 回答
3696 浏览

php - Ext.Ajax.request 中的成功处理行为

我正在研究 extjs 4 项目。在这个项目中,我必须在jsphp文件之间进行通信。所以要从 js 调用 php,我使用的是 Ext.Ajax.request。

php代码如下:

现在问题出现在我想从结果中生成列表菜单的部分dirs object。在 firebug DOM dirs = ["google","yahoo"],但在循环中,dirs.length 返回 0???

另外,当我放在alert(dirs.length)for 循环之前,它显示 0,然后正确生成列表菜单...奇怪????

0 投票
1 回答
636 浏览

javascript - Jquery Ajax 成功事件和接收响应消息出错

我正在调用 jQuery Ajax 函数,一切正常。除了,它没有收到任何响应并将其附加。

提交表单时..调用 beforeSend 事件并成功运行加载图像,并且还有一个带有“已删除”消息的警报框,但未附加来自页面的请求和响应....在 chrome 的网络选项卡中,我可以看到所选帖子的消息已删除...但它没有附加到页面中。

0 投票
2 回答
371 浏览

php - ajaxrequest 调用 php 函数而不是 get

我在页面中有一个名为 functions.js 的文件。我有行:

如何通过ajaxRequest调用php方法?我还想通过类中的 php 函数调用它(例如 save($json, $rand))

伪代码:


编辑:

也许XAJAX ( http://www.xajax-project.org/ ) 是解决方案?