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
    Nov 2005
    Posts
    3,328
    I am trying to code something much the same as the above poster; I can manipulate the properties of the html document easily enough, but I cannot get the document to display the image stored as the background image in medialab (even if the image is pointed to 'ml.background').

    The image simply will not load (and instead displays a broken link graphic). Has a workaround been developed for this, or is the only alternative to make separate html documents for each image to be used?

    I have played around with things a bit, but I still cannot get the image cued in the medialab background tab to load in the html document. If I load the image directly into the html file it works fine, but doing so is far more time consuming than being able to index the medialab background.

    I have attached my html code as well as a sample image; please take a look and let me know if there is something obviously wrong with it.

    Here's a copy with the .que file attached. It is the same skeleton as the slider example (included in the slider zip file) without any real changes; I want to get the image display working before I change too much around.

    Thanks!
    Try using <ml.bg> rather than <ml.background> and see if that helps. See the user's guide for the official variable reference or online here:

    http://www.empirisoft.com/medialab/h..._reference.htm
    Attached Files Attached Files
    Last edited by jarvis24; 03-28-2008 at 11:41 AM.

  2. #2
    Join Date
    May 2006
    Posts
    12

    slider background image

    I tried to do as you suggested in the quote below (using <ml.bg> rather than <ml.background>) and it still does not work. Instead, my image is appearing on the screen behind my custom slider. If I insert the name of the picture, it works fine. Any other suggestions?

    Quote Originally Posted by jarvis24 View Post
    Try using <ml.bg> rather than <ml.background> and see if that helps. See the user's guide for the official variable reference or online here:

    http://www.empirisoft.com/medialab/h..._reference.htm

  3. #3
    Join Date
    Nov 2005
    Posts
    3,328
    Yes--MediaLab saves a copy of the HTML file that is actually presented.. I believe it will have a "temp" in the filename. Can you run it once with <ml.bg> and once with the image name and then look at the difference in the actual html files that are generated? How can zip and post them here if you like and I'll be happy to take a look.

  4. #4
    Join Date
    May 2006
    Posts
    12
    I ran it as you suggested and have attached both of the TEMP files in the zip file. The _bg file is when I used <ml.bg> and the _pic file is when the actual filename of the picture was used. Everything looks pretty much the same to me. I have it set-up so that a picture (1 of 146) is randomly selected, so the picture filenames are different between the two runs, but that should not have affected anything. Any advice for this java novice is welcomed!
    Attached Files Attached Files

  5. #5
    Join Date
    Nov 2005
    Posts
    3,328
    I see what you mean. Could you post a copy of your que file and your custom html file? I'll run it here and see if I can figure out where the problem is.

  6. #6
    Join Date
    May 2006
    Posts
    12
    Here they are. Thanks for the help.
    Try running the attached revision (testfolder.zip) where the que file uses relative rather than absolute paths. I just tried it on my machine and it works ok now--at least with the test image I used. Note that I changed the the WGR value of the first trial to "none" for test purposes.
    Attached Files Attached Files
    Last edited by jarvis24; 07-01-2008 at 01:42 PM.

  7. #7
    Join Date
    May 2006
    Posts
    12
    The html is now reading the image name from the background field. However, now the "question" variable is not reading the question wording from the que file and I am only getting "ok" as responses in the data, rather than numerical values.

  8. #8
    Join Date
    Feb 2008
    Posts
    11
    Also, I opened the "slider.css" file from this thread, but couldn't find the "input name" part of the HTML text, which means I couldn't figure out what to name that slide so that MediaLab would store the input in SPSS. Where is that in the file?

  9. #9
    Join Date
    Nov 2005
    Posts
    3,328
    The file name you would give to MediaLab would simply be continuum.htm as in the sample que file above. Note to modify the length of the slider you can just modify the code in the htm file to whatever percentage of the screen (or number of pixels) you like:

    <table border="0" width="70%">

    And to get rid of the value appearing at the right, change:

    <input type="text" name="<ml.varname>"

    to:

    <input type="text" style="color:white" name="<ml.varname>"

    As far as displaying images within the continuum.htm page, make sure you are using the angular brackets around the image name. If the image does not appear, replace <ml.background> with the name of a specific image in the same location to see if it appears properly. If so, attach a zipped copy of the html file and image file and I'll take a look.

  10. #10
    Join Date
    Feb 2008
    Posts
    11
    Aaah...thanks. Unfortunately, I was under a time crunch and had to go with another method, but I'll definitely keep those tips in mind for when I use MediaLab in the future. And I hope someone else finds them useful in the meantime!
    Last edited by jarvis24; 03-28-2008 at 11:42 AM.

  11. #11
    Join Date
    Mar 2008
    Posts
    3

    Additional Slider Modification Questions

    Hi All,
    I have three questions about modifying the slider (I am using the revised slider posted on this thread - and using media lab v 2008.1.21):

    1) Is it possible to force the participants to move the slider before pressing continue?
    2) Is it possible to allow participants to simply click on the line and have the slide indicator (not sure what to call this - the button that is moved) automatically appear where they click instead of forcing the subject to slide the indicator to the position? (I'm just thinking this could be easier for them and help avoid question fatigue).
    3) Are there easy ways to change how the slider appears (e.g. use an image for the slider line (like a thermometer) instead of a line)?

    Also, I figured out how to have media lab record the x vector of wear someone is on a picture when they click on it (I have attached it here in case it is useful to people) - but my ideal would be to have it possible for someone to click on a line (or thermometer as attached), have a mark appear where they clicked with a number appearing representing the numerical value of where they clicked (e.g. on a scale of 1-100) and then have a separate continue button for them to click on afterwards (the approach I use in the attached version automatically advances them, but I would like for the subject to see where they clicked and then press continue, with option to change where they clicked if they made a mistake). Is this possible? If it is, can you help me with creating a measurement tool that would do this?

    Thanks in advance for your help!
    -Sol
    Attached Files Attached Files

  12. #12
    Join Date
    Nov 2005
    Posts
    3,328
    Unfortunately most of these questions go beyond MediaLab and are really HTML and JAVA questions. I do think you could add some validation code to the form post section though to ensure they have moved the slider. It's just not something I'm especially great at coding. There may be an example worth looking at here:

    http://www.empirisoft.com/support/showthread.php?t=222

    Also, feel free to post any new techniques you discover on the sharing board:

    http://www.empirisoft.com/support/forumdisplay.php?f=25

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
  •