在Qualtrics上,如何使用JavaScript保存嵌入式数据(鉴于最近更新了Qualtrics,旧的SO解决方案不再有效) [英] On Qualtrics, how to save embedded data with javascript (given that qualtrics has recently been updated and an old SO solution no longer works)

查看:1218
本文介绍了在Qualtrics上,如何使用JavaScript保存嵌入式数据(鉴于最近更新了Qualtrics,旧的SO解决方案不再有效)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

几个月前,我使用了在此处在Qualtrics中创建一个调查,其中包含一些JavaScript代码,用于将人们的回复(通过移动滑块)作为嵌入数据保存。这一切都取决于当点击下一步按钮时可以调用一些函数,如 $('NextButton')。onclick = function(event)上面的链接。

A few months ago I used the excellent advice over here to create a survey in Qualtrics with some javascript code that saved people's responses (given by moving a slider) as embedded data. It all hinges on being able to call some functions when the "Next" button is clicked, as is found under $('NextButton').onclick = function (event) in the above link.

我想在本周末重复使用此调查,发现数据已不再保存。经过一段时间,我意识到,目前,任何这样的功能现在只有第一次运行下一个按钮被点击,而不是任何后续的时间。换句话说,恰恰相同的javascript将工作或什么也不做,这取决于它是否恰巧是第一次点击下一个按钮。

I wanted to reuse that survey this weekend, and found that the data was no longer being saved. After fiddling around a bit, I realised that currently, any such function will now only be run the first time the "next" button is clicked, and not on any subsequent time. In other words, precisely the same javascript will either work or do nothing depending on whether it happens to be the first time the next button is clicked.

我邮寄了Qualtrics寻求建议,他们的支持人员邮寄了以下信息:

I mailed Qualtrics asking for advice, and their support person mailed back with the following:


运行我们调查的旧应用程序将在您每次访问调查中的新页面时重新加载页面。目前运行我们的调查的应用程序是一个单页应用程序,并且在调查中的下一页不会刷新整个页面,它只是呈现一个不同的部分。

The old application that ran our surveys would reload the page each time you went to a new page in the survey. The current application that runs our surveys is a one page app and going to the next page in a survey does not refresh that entire page, it just presents a different section.

我在Qualtrics网站上找不到任何有关上述更新的更多信息,或指示是否有一个新的CSS选择器可用于选择当前显示的下一步按钮,替换$(NextButton),我不知道如何逆向工程Qualtrics调查网页来为自己工作。

I couldn't find anything on the Qualtrics website giving more information about the aforementioned update, or indicating whether there's a new CSS selector that could be used to select the currently-displayed "next" button, replacing $("NextButton"), and I have no idea how to reverse engineer a Qualtrics survey web page to work it out for myself.

任何人都可以建议如何修改上述链接答案中的代码,以便在更新的Qualtrics平台上工作?或者任何人都可以确认他们的旧代码是否仍然有效,在这种情况下,我错误识别的问题是什么。

Can anyone suggest how the code in the linked answer above might be altered to work on the updated Qualtrics platform? Or can anyone confirm whether their old code still works, in which case I'm mis-identifying what the problem is.

我没有足够的声誉评论上述链接解决方案,指出这个问题,但也许有人可以这样做。如果我从Qualtrics支持中获得更多信息,我会更新这个。

I have insufficient reputation to comment on the above-linked solution to point out this issue, but perhaps someone else could do so. I'll update this if I get any more information from Qualtrics support.

推荐答案

Qualtrics使用两个测量引擎:较旧的SE和较新的JFE。 Qualtrics支持是指JFE。您可以强制Qualtrics使用SE通过添加参数Q_JFE = 0到您的调查链接。这可能是一个快速修复。

Qualtrics uses two survey engines: the older SE and the newer JFE. Qualtrics Support was referring to JFE. You can force Qualtrics to use SE by adding the parameter Q_JFE=0 to your survey link. That might be a quick fix.

也就是说,添加事件监听器到NextButton从来没有可靠地与SE或JFE。 Qualtrics在下一个按钮上有干扰的自己的事件侦听器。最可靠的方法是使用JavaScript隐藏NextButton,然后添加您自己的按钮,执行您需要的任何进程,然后在最后单击NextButton。请参见示例此处< a>。

That said, adding an event listener to the NextButton has never worked reliably with either SE or JFE. Qualtrics has its own event listeners on the Next Button that interfere. The most reliable method is to use JavaScript to hide the NextButton, then add your own button that performs any process you need, then at the end clicks NextButton. See example here.

这篇关于在Qualtrics上,如何使用JavaScript保存嵌入式数据(鉴于最近更新了Qualtrics,旧的SO解决方案不再有效)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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