click button and file attachment

PennController for IBEX Forums Support click button and file attachment

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #9888
    ElRk
    Participant

    Hello,

    I want to add to my experiment a “Continue” click button between the experimental items but I’ve been stuck.
    In the current edition, the participant would see a message like “Press any key to continue” (from the keyboard) but I need to replace it with a mouse click.
    I tried the new button command but it doesn’t work, I’m sure that I’m missing something.

    Also I wanted to confirm if it’s possible or not to attach a file (at the introduction section) that the participants could download.

    demo link: https://farm.pcibex.net/r/RLwLNB/

    Many thanks in advance-
    Eleni

    • This topic was modified 1 year, 2 months ago by ElRk.
    #9899
    Jeremy
    Keymaster

    Hello Eleni,

    Currently you’re inserting a trial labeled “sep” between your experimental trials, which uses Ibex’s Message controller to display some text, and invites participants to use a keypress since you use transfer: "keypress". You could use transfer: "click" instead if you wanted participants to invite the participants to click instead (you can set continueMessage to a custom message if you’d like)

    You cannot use the PCIbex Farm to host a file that you invite your participants to download. But if you have another hosting solution and have a direct link to that file, then you can use the HTML tag <a>, as in <a href="https://link.to.your/file" target="_blank" download="filename.ext">Click here to open/download the file</a>

    Jeremy

    #9978
    ElRk
    Participant

    Dear Jeremy,

    Regarding the HTML tag for the link, I’ve made a lot οf tests but unfortunately I haven’t managed to embed it in the existing code.
    Any tip would be really helpful!!

    #9981
    Jeremy
    Keymaster

    Hello,

    In a PennController trial, you could do that:

    newTrial(
      newText("<a href='https://getsamplefiles.com/download/zip/sample-1.zip' target='_blank'>Click here to download a zip file</a>").print()
      ,
      newButton("Next").print().wait()
    )

    In an Ibex Message controller, you could do that:

    var items = [
    
      ["intro", "Message", {html:
        "<div>\
          <p><h1>hello</h1></p>\
          <p><strong>world</strong></p>\
          <p><a href='https://getsamplefiles.com/download/zip/sample-1.zip' target='_blank'>Click here to download a zip file</a></p>\
        </div>"
      }]
      
    ];
    
    #9982
    ElRk
    Participant

    Thank you so so much for your time and help! Really appreciate it!

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.