Trouble displaying experiment via Qualtrics in Chrome

259 views
Skip to first unread message

Chris Burke

unread,
Jun 13, 2013, 9:34:28 AM6/13/13
to scrip...@googlegroups.com
Hi all,

I've written a simple little experiment in ScriptingRT that seems to be running and saving data successfully across a range of browsers. My goal was to embed the swf in a Qualtrics survey, and Thomas's post on the blog was very helpful in that regard. I put a copy of swfobject.js on my server and created a text question on Qualtrics with the following HTML content:

        <script type="text/javascript" src="http://www.burkelab.us/swfobject.js"></script>
        <script type="text/javascript">
            var flashvars = {};
            var params = {};
            params.play = "true";
            params.loop = "false";
            params.menu = "true";
            params.allowfullscreen = "true";
            params.allowscriptaccess = "always";
            var attributes = {};
            swfobject.embedSWF("http://www.burkelab.us/MeNotMeIAT/MeNotMeIAT.swf", "myAlternativeContent", "800", "600", "9.0.0", "http://www.burkelab.us/expressInstall.swf", flashvars, params, attributes);
        </script>
    </head>
    <body>
        <div id="myAlternativeContent">
            <a href="http://www.adobe.com/go/getflashplayer">
                <img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" />
            </a>
        </div>
    </body>
<p>Click on the START button above to begin the task.</p>
<p>Only proceed to the next page after you are told that the data are saved.</p>

This is basically the same as in the blog post, tailored to the files on my server and without flashvars.

Anyway, I then tried to run the experiment in Firefox, and it worked beautifully. However, when I try to run it in Chrome, it just displays the Flash installation badge. Chrome comes with the Flash plugin already installed, and if I click the button it says I'm up to date, but somehow Qualtrics can't find it when I'm using Chrome. A grad student of mine had the same issue on a separate computer but got it to work on IE. And if I type in the URL for the .swf file directly in Chrome, it runs no problem. And even if I didn't have Flash installed, shouldn't it run expressInstall.swf automatically? So there seems to be a problem at the interface between Flash and Qualtrics, but only in Chrome. Any ideas why this might be happening? Has anyone else encountered this problem? Here are links to the Qualtrics survey and my .swf and .mxml files if they're helpful.

Thanks!

Chris Burke

Thomas Schubert

unread,
Jun 13, 2013, 10:41:39 AM6/13/13
to scrip...@googlegroups.com
Chris,

this is weird indeed. But I have a lead. In chrome, turn on Tools - Developer tools, and then locate the console.

when opening your qualtrics page, it logs:


In other words, Chrome perceives a security problem here. You probably also see a shield popping up in the url bar, informing of insecure content. When you click the shield and say "load unsafe script", your swf appears.

I suspect this only happens because the qualtrics page is served by https, and your content is coming from http only. Interestingly, when you save the source code from the qualtrics page to a local file and open that, the swf is displayed properly.

At the moment, I don't know how to solve this. Perhaps the new swfobject (https://github.com/swfobject/swfobject) is helpful, but I doubt it. One workaround could be to open the swf as a pop up in a new window. Or a https server for the js and swf content.

perhaps this helps you on the right track. I will also think and try more.

t



-- 
thomas schubert
department of psychology, university of oslo 
schu...@igroup.org
http://www.igroup.org/schubert/

Thomas Schubert

unread,
Jun 13, 2013, 10:56:04 AM6/13/13
to scrip...@googlegroups.com
I saw that google hosts the swfobject on its servers

https://code.google.com/p/swfobject/wiki/hosted_library

the link

https://ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js

works. So maybe using this link to the library instead of yours already
helps. But maybe you need to get the swf also from https

t

Thomas Schubert

unread,
Jun 19, 2013, 4:04:37 AM6/19/13
to scrip...@googlegroups.com
Chris,

did you make progress on this problem?

I asked my server hosting service. They charge around 80 $ for a SSL certificate per year, but it would be worth paying it for this purpose. The question is whether only the swfobject.js or also the swf has to be stored on a https server

t.

Thomas Schubert

unread,
Jun 19, 2013, 7:31:56 AM6/19/13
to scrip...@googlegroups.com
I checked your qualtrics site again, it looks like you solved the issue by opening a new window instead of embedding. 

And I saw that your task is actually an IAT. very nice. Does it do counterbalancing of the order of compatible vs. incompatible blocks?

If you are done with this, it would be excellent if you would make the code for your IAT available (or we could put it on the website). There have been several people asking me about doing an IAT with scriptingrt.

best, thomas

Chris Burke

unread,
Jun 19, 2013, 4:32:34 PM6/19/13
to scrip...@googlegroups.com
Hi Thomas,

Yes, as you suspected, the issue with Chrome was linking to the insecure swf from the secure Qualtrics survey. The good folks at Qualtrics helped me troubleshoot the problem. My solution of linking to the swf that opens in a new window isn't very elegant, but it works for now. I agree that it might be worth paying for the SSL certificate down the road, especially if I end up using scriptingRT a lot.

As for the experiment, I'd be happy to share the mxml for my IAT as soon as it's finished, but I will state upfront that the code isn't very pretty. I'm sure there's probably a simpler solution using scripts, but I'm a newbie to programming in Flex/Flash and Javascript, so I'm not sure what that solution looks like. Hopefully, the program will become more streamlined over time! It currently does not counterbalance the order of the blocks. Also, I haven't taken advantage of Flashvars because of the way this particular experiment will be set up, but they could definitely simplify things under other circumstances. I'll start a new thread as soon as I finalize the code.

Thanks,

Chris

Thomas Schubert

unread,
Jun 20, 2013, 3:27:55 AM6/20/13
to scrip...@googlegroups.com


> Yes, as you suspected, the issue with Chrome was linking to the
> insecure swf from the secure Qualtrics survey. The good folks at
> Qualtrics helped me troubleshoot the problem.
did they have any suggestions on how to solve the problem while still
embedding?

> As for the experiment, I'd be happy to share the mxml for my IAT as
> soon as it's finished

great. I suggest to put it on http://openscienceframework.org/ and link
to it here. This will make it easy to keep track of different versions.

best, t.

Chris Burke

unread,
Jun 20, 2013, 9:12:23 AM6/20/13
to scrip...@googlegroups.com
Hi Thomas,

Qualtrics support just suggested that I link to secure rather than insecure files, as Chrome would detect the conflict however it was embedded. For instance, the problem persisted when I used the Insert Media button in Qualtrics' rich text editor. This option embeds the file directly without using swfobject (meaning that you don't get the benefits of swfobject, like displaying the Install Flash badge or triggering ExpressInstall if Flash is unavailable), but no luck (because the swf itself was on an insecure server). And if you try to use a self-signed SSL certificate, the user needs to add a security exception in order to view the file. That's why, in the end, I decided to just link out to the file rather than embedding it until I bite the bullet and purchase the SSL certificate.

Thanks for pointing me to the Open Science Framework website. I'll upload the files and distribute the link when I get a chance.

Thanks again,

Chris
Reply all
Reply to author
Forward
0 new messages