Empirisoft Support

    Welcome to Empirisoft Support
Results 1 to 11 of 11

Thread: Making custom instructions and items appearing twice

  1. #1
    Join Date
    Jan 2006
    Posts
    32

    Making custom instructions and items appearing twice

    Blair, I have figured out how to do the transition from custom html to DRT (or whatever was wrong, is right now), but there seems to be some problem with one item. Our demographics item always appears twice. Also, not all data is written. I use one "template" and the ml.varname/ml.textlabelX/ml.questionwording parameter. Only the first item gets recorded though... why is that? I'd also like to know how to use Custom items that don't write data (like instructions). It is important for us that subjects think they actually are using the IE. So they should proceed using the well known buttons (and not the cntinue field of ML). Should we still use forms for that? Using the post or action tags? Attached you'll find an example experiment (or questionnaire). We are (as always) quiet in a hurry, so a quick solution would be very much appreciated! All the best and thx Rene

  2. #2
    Join Date
    Jan 2006
    Posts
    32
    forgot the attachement...
    Attached Files Attached Files

  3. #3
    Join Date
    Nov 2005
    Posts
    3,328
    This one really blew my mind. I tried everything and couldn't get it to run the first demo question just once. I got to the point where I completely replaced the content of the html file with code from one of my own custom items. Same thing--always came up twice!

    So I tried some long shot stuff. One idea was to change the underscores in the file names to dashes. That didn't help--in fact it made it stranger. Even though I was now calling "demos-pos-d.html" from the que file and I had renamed the file accordingly (i.e., "demos-pos-d.html"), MediaLab produced an Internet Explorer page saying it couldn't find the file! That made no sense. So I right clicked on IE's file not found screen and selected properties. I checked out the name of the file it was looking for and it said "demos_pos_d.html"! That made no sense because I had changed it to "demos-pos-d.html".

    So, eventually, I debug from the MediaLab code and tell it to stop when it gets to the d_demos item so I could see what was going on. Guess what--it didn't get that far before the demo item was appearing. OK, so if MediaLab wasn't requesting the demo item--who was??

    Can you guess?

    Answer: action="demos_pos_d.html" contained in your initial instruction item! The first file, "coverstory-pos-d.html" has a redirect to the following demo item. So the browser goes there while still running the cover story item. When you click continue, MediaLab then goes to the demo item as requested--thus, you get it twice.

    So it seems, maybe you were doing the re-direct as a way of using the custom items for instruction screens (your other question!). Clever solution *and* it provides the answer to your first question

    So let's get rid of the action="demos_pos_d.html" and see if we can find another way to do instructions. Have you thought about using a hidden variable?

  4. #4
    Join Date
    Jan 2006
    Posts
    32
    Thanks Blair! I'll see what I can do about it. A hidden variable sounds not too bad...

    What about the data? What did I do wrong? Is there another way to use one template, but with different variables?

    Best
    Rene

  5. #5
    Join Date
    Jan 2006
    Posts
    32
    Blair,

    the solution is even more simpler than using a hidden variable (which works, too). One needs only to squeeze in a name tag.

    Instead of
    Code:
    <form method="post"><input type="submit" value="continue"/></form>
    one can simply use
    Code:
    <form method="post"><input type="submit" name="varname" value="continue"/></form>
    If ML receives data it will automatically proceed to the next item.

    Leaves only the problem with the data... as you can see in my example files, there should be 7 (or so) values in the data file. But somehow there aren't...

    Why is that?

    Best
    Rene
    Last edited by Rene Kopietz; 07-20-2007 at 01:01 PM.

  6. #6
    Join Date
    Jan 2006
    Posts
    32
    Hi there,

    somehow - in a newer, extended version of this questionnaire - data seems to be written properly...

    I'll get back to you if we encounter further similar problems.

    Best
    Rene

  7. #7
    Join Date
    Nov 2005
    Posts
    3,328
    Glad to hear the data are ok now.

    That's a really handy tip regarding the continue button, thanks Rene. I think many users would find it helpful to be able to create custom items that do not require the collection of any data (i.e., for instruction screens and such).

    Am I correct though that you could do the same thing with an HTML item rather than a custom item? But that the advantage of using a custom item is that you can have greater control over the method of continuation? e.g., having the button contained within the HTML itself rather than at the bottom right of the MediaLab screen? And perhaps you could also add some validation events that MediaLab couldn't normally check. Intersting possibilities!

    Would you mind posting a revised version of your folder in case other users might want to check out how you did it?
    Last edited by jarvis24; 07-23-2007 at 10:35 AM.

  8. #8
    Join Date
    Jan 2006
    Posts
    32
    [edited by moderator]

    Attached you'll find our final version of the experiment. As for the background: it's a German version of the Saying-is-believing paradigm. We chose the custom item solution, because we wanted to make it more realistically. Everyone knows the internet and using it should add to the experimental reality of our experiment.

    Our problem is that not all of the custom data are written to the data file. The ones that are missing are: aom1 thru 6, target1 thru 5, audi1 and 3 and ease. This is really strange, because these items mostly use the same custom item file named "scales8". It uses the ml.varname functionality. The custom item code seems work for all but a few variables. I can't see any difference between items that are (vs. are not) recorded.

    Update August 6, 2007:

    It seems we have found a solution. After renaming the problematic variables ML writes them correctly into the data file. Any idea why that happened?

    Thanks a lot in advance!

    Best
    Rene

    PS: I'm goint to programm an English example questionnaire using our custom item and instruction method soon.
    Attached Files Attached Files
    Last edited by jarvis24; 08-06-2007 at 05:20 AM.

  9. #9
    Join Date
    Nov 2005
    Posts
    3,328
    Yes, turns out there was a bug in the new feature which allows for long variable names. On the problematic items, there were spaces at the end of your variable names. Long story short, that's what was causing the problem. So a quick fix is to make sure there are no embedded spaces at the end of your variable names but I've also fixed this in the code so that it will not be a problem in the next version.

  10. #10
    Hi,
    I was just curious if an English version of this questionnaire was ever created or posted. It sounds great and I'd like to utilize the chat room simulation aspect.
    Thanks.

  11. #11
    Join Date
    Nov 2005
    Posts
    3,328
    I've emailed Rene to see if he might be able to help.

Similar Threads

  1. Creating Custom items
    By pallavi.chilappagari in forum MediaLab Older Versions: How Do I...
    Replies: 11
    Last Post: 02-20-2010, 04:19 AM
  2. making horizontal text labels smaller
    By kqbinvn in forum MediaLab Older Versions: How Do I...
    Replies: 1
    Last Post: 02-23-2007, 01:14 PM
  3. Quickstyles & Custom Items
    By ryalch in forum MediaLab Older Versions: How Do I...
    Replies: 1
    Last Post: 01-17-2007, 04:10 PM
  4. Going to the next screen using Custom Items
    By kristen.wwu in forum MediaLab Older Versions: General Questions
    Replies: 3
    Last Post: 10-26-2006, 02:12 PM
  5. Instructions for the DirectIN Boxes
    By JEC in forum Hardware: How Do I...
    Replies: 0
    Last Post: 12-07-2005, 10:53 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •