Empirisoft Support

    Welcome to Empirisoft Support
Results 1 to 17 of 17

Thread: Custom item - Autosum

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Aug 2006
    Posts
    3

    Custom item - Autosum

    Hi, if anyone could help me out on this - many thanks in advance!

    I'm trying to find out if someone has already developed this custom item. It sounds simple enough but I don't have any programming experience.

    I have 1 item with 5 labels. I want the respondent to rate their preference for each of these labels using a number from 0-100, but i'd like the total for each of label preference to add to 100, like so:

    A: 25
    B: 30
    C: 0
    D: 0
    E: 45
    Total = 100
    The total has to add to 100 in order to go to the next item. Does anybody know of someone who has done this and would like to share?

    If I'm not making sense, I can reclarify.

  2. #2
    Join Date
    Nov 2005
    Posts
    3,328
    Check this out--it's a custom item that was developed by one of our other users--I just modified it a bit to match what you are describing. See if it's in the ball park.
    Attached Files Attached Files

  3. #3
    Join Date
    Aug 2006
    Posts
    3
    Thanks heaps - i'm having some trouble trying to get the data to save to a new xml file automatically, or even the existing one in which the experiment is inputting to. Any thoughts?

  4. #4
    Join Date
    Nov 2005
    Posts
    3,328
    The data should be saving automatically to the MediaLab data file.

  5. #5
    Join Date
    Aug 2006
    Posts
    3
    Thanks, I've figured out how to get it to save now.

    However, the data is being written in a strange way. My variable name is "1BEH", and the data is being written as "1beh=asdf" ("asdf" being the input).

    How do I get rid of the "1beh="?

  6. #6
    Join Date
    Nov 2005
    Posts
    3,328
    What version of MediaLab are you using, i.e., 2006.x.x?

  7. #7

    auto sum item

    Hello,

    I need a custom item just like the one you describe in your post from September 2006. Did you ever get this to work?

  8. #8
    Join Date
    Aug 2008
    Posts
    14

    custom percentage item

    I also need an item just like this (which I have posted about in another thread before finding this one). It looks great at first - however, I couldn't get it to work because whenever the total was supposed to add up to 100, the box said it was '10'. Thoughts? fixes?

    There's also a straggling letter 'h' hanging down on the page - not sure if this has anything to do with it. I'm not super familiar with Javascript, although I've been trying/willing to learn in order to deal with these items I need.

  9. #9
    Join Date
    Aug 2008
    Posts
    14
    Got this to work for me after all! Some minor edits to the code, and it worked beautifully. I suspect maybe it didn't work before because of some browser compatibility issues, but I don't know for sure. Anyway, thanks to all for providing this code - it was a big help to me.

  10. #10
    Join Date
    Nov 2005
    Posts
    3,328
    Wagnerla,

    Thanks for the update--would you care to post and attach your revised version just in case it could help anyone who comes across the same problem?

    -Blair

  11. #11
    Join Date
    Aug 2008
    Posts
    14

    updates to autosum

    Sure - here's my version of it. I took out the hanging "h" which seemed to be causing some problems. I also re-did the layout so the percentages are vertical instead of spread out across the page, and made it so that a participant can enter "100" in one box and leave the rest as zero. There's a style sheet that makes it look more similar to the default MediaLab style, for better continuity. I hope this is helpful to some people.
    Attached Files Attached Files

Similar Threads

  1. custom item with background image
    By rkozink in forum MediaLab Older Versions: How Do I...
    Replies: 1
    Last Post: 05-04-2006, 01:10 PM

Posting Permissions

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