未解 - 添加自动填充用Javascript来Qualtrics [英] Unsolved - Adding Autocomplete with Javascript to Qualtrics

查看:566
本文介绍了未解 - 添加自动填充用Javascript来Qualtrics的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想实现一个自动完成功能,Qualtrics在线调查管理软件。作为导演的在Qualtrics 网站上的此功能,我已经添加了code的主要功能,它的头的外观部分。

I'm trying to implement an autocomplete feature to Qualtrics online survey management software. As directed in this feature on the Qualtrics website, I've added the main features of the code to the header of it's Look and Feel section.

<br />
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.3/jquery-ui.min.js"></script><script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script><script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script><script src="https://ajax.googleapis.com/ajax/libs/jquerymobile/1.4.5/jquery.mobile.min.js"></script><script>

var $j = jQuery.noConflict();  
 $j(function() {
var availableTags = [
  "Selection 1",
  "Selection 2",
  "Selection 3"
];
$j( "#tags" ).autocomplete({
  source: availableTags
});
});
</script>

另外,我已将此添加到具体问题块我想要的自动完成功能应用于。

Also, I've added this to the specific question block I want the autocomplete feature to be applied to.

Qualtrics.SurveyEngine.addOnload(function() {
jQuery(function() {
jQuery( "#tags" ).autocomplete({source: availableTags});
});
});

我没有收到错误消息,在文本输入字段只是不调用的标记。

I receive no error messages, the text input field just does not call up the tags.

PS:两个计算器用户都问同样的问题,一是有固定的这个问题,但没有给出解释什么工作过,第二个没有收到来自社会各界的响应

PS: Two stackoverflow users have asked the same question, one had fixed the issue but gave no explanation for exactly what had worked, and the second received no response from the community.

PS.2:如果可能的话,请包括改编code使用的,这样我可以很容易地实现它,我有code :)一个非常粗略的知识

PS.2: If possible, please include an adapted code for use so that I can implement it easily, I have a very cursory knowledge of code :) .

推荐答案

试着改变#tags到.InputText。 #tags指不Qualtrics存在一个id。 .InputText是在文本输入字段的一类。

Try changing "#tags" to ".InputText". #tags refers to an id that doesn't exist in Qualtrics. .InputText is a class used on text input fields.

将这个(当安东尼推荐):

Put this in the Qualtrics header (as Anthony recommended):

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquerymobile/1.4.5/jquery.mobile.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.3/jquery-ui.min.js"></script>
<script>
var $j = jQuery.noConflict();  
</script>

这在你的问题(没有Qualtrics.SurveyEngine.addOnload),所以它仅适用于页面,你的问题就可以了:

And this in your question (with NO Qualtrics.SurveyEngine.addOnload) so it only applies to the page with your question on it:

$j(function() {
    var availableTags = [
        "Selection 1",
        "Selection 2",
        "Selection 3"
    ];
    $j( ".InputText" ).autocomplete({
        source: availableTags
    });
});

这篇关于未解 - 添加自动填充用Javascript来Qualtrics的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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