Empirisoft Support

    Welcome to Empirisoft Support
Results 1 to 48 of 48

Thread: Slider size (case 17391)

Hybrid View

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

    Slider size (case 17391)

    As I was playing with the advanced features experiment, and the "slider" response option, I was wondering if there is a way to have a slider with more than 10 or 12 points? There is a scale used in my field that uses a "line slider" but with 100 points on the slide. Is that possible with MediaLab?

    Thanks,
    Josland
    Last edited by jason_reed; 12-02-2014 at 11:43 AM.

  2. #2
    Join Date
    Nov 2005
    Posts
    3,328
    Yes, there is. MediaLab now support html forms so you can create pretty much anything you want. I've attached a sample (below) of a 100 point slider. It's a java slider embeded within an html page and it shows you the value (from 1 to 100) as you slide it back and forth. It's pretty cool--check it out and see if it's in the ballpark of what you're looking for. Also, if you know any html or java, you can modify it to look and respond however you want. MediaLab simply loads it up, gives it access to question wording, response opitons, colours and such, and then intercepts any posted data. Soon we'll start posting more samples like this--it really opens up the possibilities.

    NOTE: The slider item origionally posted here (slider.zip) works for MediaLab 2006.1.*. For users of newer releases (v2006.2.1 or later), slider_revised.zip should be used.
    Attached Files Attached Files
    Last edited by jarvis24; 02-13-2007 at 07:53 AM.

  3. #3
    Join Date
    Nov 2005
    Posts
    3,328
    [edited from support email]
    1. Is there a specific program one should use to edit the continuum.htm file? I do not have much html experience but MS Word seems like it might be inept at this. I would like to be able to add in little images (e.g. smilies) below the slider to reinforce the number value associated with the response.
    2. Is there a way to change the values of the slider from (1,100) to something else, like (-10,10)?Again, I apprecite the support on this. As I mentioned I have little to no html experience.

  4. #4
    Join Date
    Nov 2005
    Posts
    3,328
    Best way to edit html, for me, is with the Windows notepad, or any simple text editor. You can also use Microsoft Frontpage--it is targeted at people who are new to HTML. Generally I would avoid Word unless you are technophobic in which case, it might be the way to go--or find a student who knows HTML--hey there goes one walking down the hall now!

    To adjust the range on the slider, just open the conitinuum.htm file in a text editor and change the following text:

    s.setMinimum(0);
    s.setMaximum(100);
    s.setValue(50);

    to:

    s.setMinimum(-50);
    s.setMaximum(50);
    s.setValue(0);

    And see how that goes!

  5. #5
    Join Date
    Nov 2006
    Posts
    4
    We are finally getting ready to use the MediaLab software for our study. We are using the slider, which you provided earlier, for creating a pain intensity visual analog scale (VAS). The pain VAS ranges from 0-10. We want the slider to report the integer values (e.g. 1, 2, 3...) as well as fraction values upto the first decimal place (e.g. 1.1, 4.3, 5.6...). I modified the slider to that allows it to report the integer values. However, we don't know how to report the fraction values. Can you please help? I am attaching the modified slider.
    Last edited by jarvis24; 03-25-2010 at 08:03 PM.

  6. #6
    Join Date
    Nov 2006
    Posts
    4
    I actually found a solution: I made couple of changes to the slider, 1) I set the slider minimum value to 0 and maximum value to 100, 2) then I set the input text color to white so that the subject cannot see the displayed number on the right side of the slider. See the attached slider (pain.htm).

    However, now I have 4 more issues:
    1) Because I want the slider output to be between 0 and 10, is there a way that MediaLab would divide the output of the slider (between 0 and 100) by 10 to give us the actual value?
    2) I want the length of the VAS to be 10 centimeters long. However, it shows up not be 10 cm. Is there anyway that the Javascript can be setup that it automatically figures out the resolution of the screen and sets it to 10 cm?
    3) On running a MediaLab experiment with the slider (pain.htm), I receive an error box that states something like "var 003 will not be saved... it is a string." I receive quite a few of these messages right before the final prompt that states that the experiment is over. How can I avoid these messages?
    4) Another problem is related to the .csv file generated by MediaLab after running an experiment using the slider. Instead of having actual numbers, the .csv file states "OK." How can that be fixed?

  7. #7
    Join Date
    Nov 2007
    Posts
    13

    Slider_revised for 2008 version

    [edited by moderator]
    Hi, I tried to use a modified version of the slider you have in your forum for an experiment run with medialab version 2008. The slider worked perfectly for version 2006, but it did not collect any data in the version 2008 (although superficially it worked ok as well).
    Last edited by jarvis24; 05-27-2008 at 05:41 AM.

  8. #8
    Join Date
    Nov 2005
    Posts
    3,328
    issrcadmin,

    First I've heard of that. Can you zip and attach or send us a copy of your experiment folder complete with sample data? Or better yet, create a simple test folder with just the que file, the slider and data from a single sample run showing the problem--in your case, that no data show up for the slider in the data files. With a simplified 'troubleshooting' version like that we can usually pinpoint the problem fairly quickly.

  9. #9
    Join Date
    Nov 2007
    Posts
    13

    Test slider

    Hi,

    attached a zipped file with the slider and data folders and a simplified version of the experiment (the experiment originally included many images and directrt files that I omitted to reduce file size. The problem also appears in this simplified version).

    As you can see, in all the slider measures "ok" is written instead of data. All the not-slider measures worked. Finally the exact same file runned perfectly including data collection in v2006.

    Finally we still have the data files from the original experiment. Is there possibly a way to retrieve the data from those it is lost for good?

    Thanks for a prompt reply
    Attached Files Attached Files

  10. #10
    Join Date
    Nov 2005
    Posts
    3,328
    Yes, I ran the sample you attached, and I got the result you described. I don't think there is a way to retrieve those data, but I do think I can explain why it happened.

    I took a look at the html in a few of your sample custom items. In the area where you define the variable name for the response, you have it set to "var" but that is not a variable in your experiment. e.g., the first two items to use "like.htm" are ashlik and cuplik. But for both, the variable name stated in the html is name="var" and so MediaLab would not know you want the first two responses posted from like.htm to be assigned to ashlik and cuplik, respectively.

    What ought to work, e.g., for ashlik would be if the html were to use name="ashlik". Consequently,it would use the form data for the MediaLab item that uses that variable name. This method is a bit cumbersome though because in your case you would have to create a different html file for each item (e.g., a different version which uses name="cuplik"). See the section on Creating Custom Items in the user's guide for more detail on using a single custom item file with multiple variables

    So after all that--the easiest alternative here would be to use name="<ml.varname>" in your html. That tells MediaLab to use the name of the current item so you can use one file (such as like.htm for multiple items). In fact, I'm curious--the original code for the slider posted in this thread (above) actually uses <ml.varname>. Is there a reason you changed it to "var"?

    Hope this makes some sense.

Similar Threads

  1. MediaLab Version 2008.1
    By jarvis24 in forum MediaLab v2018: Version History
    Replies: 9
    Last Post: 08-18-2024, 05:19 PM
  2. DirectRT Version 2008.1
    By jarvis24 in forum DirectRT v2018: Version History
    Replies: 7
    Last Post: 10-26-2018, 07:28 AM
  3. Version / Backwards Compatibility (case 40)
    By jarvis24 in forum Pre-Sales and Licensing FAQ
    Replies: 4
    Last Post: 07-23-2012, 10:12 AM
  4. older versions and MediaLab 2008
    By NancyBrodsky in forum MediaLab Older Versions: General Questions
    Replies: 3
    Last Post: 04-07-2008, 01:38 PM
  5. Run-only version?
    By mha in forum Pre-Sales and Licensing FAQ
    Replies: 1
    Last Post: 09-25-2007, 07:43 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
  •