Is there a way to skip the dialog box when running online?

Description of the problem: Hi all, I am trying to find a way to skip the dialog box at the beginning of an experiment. I would like the experiment to start immediately when pressing the link, without the need to fill in the participant number and press “ok” or “cancel”.

Within psychopy, it is possible to remove click from “show info dialog” under “edit experiment settings”. Is there a way to do the same when running online through pavlovia?

Thanks!

Noam

1 Like

Hi Noam,

Unfortunately this is not possible out of box just yet.

If it is that you are trying to prevent your participant having to complete the participant fields etc you can autocomplete these using query strings - then your participant would just need to press “OK” once the experiment resources had loaded.

Thanks,
Becca

Thanks Becca. Is there a way to skip the “OK” after resources are loaded? My experiment is sent to blind individuals saying that it would be easier if the task begins once pressing the link.

Old thread, but if someone is looking for a “OK-Button press”-solution (I was), this might be useful. Just use the code below in a JS-Only-Before-Experiment-Code-Component

var checkOK = setInterval(function() { //Use basic nested setInterval for Status check of dialog
    console.log("Check if DialogBox loaded");
   if (document.getElementById("progressMsg")) { //Wait for ProgressMsg to exist
        console.log("Dialogbox exists."); //Dialog Box Ready
      var statusText = document.getElementById("progressMsg").innerHTML; //get Status of ProgressMsg
      if(statusText == "all resources downloaded.") //If status is good. Go and let JS Click the button
      {
      console.log("All resources were downloaded! Press Ok now...");
      document.getElementById("buttonOk").click(); // Click on the checkbox
      clearInterval(checkOK);
      }
   }
}, 500); // check every 500ms


The dialog box is clicked by JS-Code after all resources have been downloaded.

Best
Luke

1 Like

Lovely. I’ve added it to my code snippets page.

1 Like

Thanks @Luke awesome code. Just for anyone who will stumble across that post in the future, the id of the “OK”-button seems to have changed, so now the following code works (all the credit goes to @Luke)

var checkOK = setInterval(function() { //Use basic nested setInterval for Status check of dialog
    console.log("Check if DialogBox loaded");
   if (document.getElementById("progressMsg")) { //Wait for ProgressMsg to exist
        console.log("Dialogbox exists."); //Dialog Box Ready
      var statusText = document.getElementById("progressMsg").innerHTML; //get Status of ProgressMsg
      if(statusText == "all resources downloaded.") //If status is good. Go and let JS Click the button
      {
      console.log("All resources were downloaded! Press Ok now...");
      document.getElementById("dialogOK").click(); // Click on the checkbox
      clearInterval(checkOK);
      }
   }
}, 500); // check every 500ms

//Source: https://discourse.psychopy.org/t/is-there-a-way-to-skip-the-dialog-box-when-running-online/25625/2

The line document.getElementById("buttonOK").click(); now is document.getElementById("dialogOK").click();

Cheers to anyone, who might find that in the future :slight_smile:

1 Like

I’ve just added the code. It still works (thank you!) and still prohibits transition to full screen (boo!). In case anyone is looking to this discussion and wondering if it still works, it does.

I have an experiment that also only fails on Safari.

This message appears:


The “this” occurence is unknown. The developer tools are not available (and the crib sheet instructions to make them available in Safari were not successful).

Chrome on Mac and PC now run the experiment without errors.

I don’t mean to hijack the thread, I just saw how recent this was. I’m seeing similar issues.

My experiment for reference

On Chrome the experiment isn’t running full screen. This is due to a recent issue with the auto-click code, which may also be causing your experiment to crash on Safari.

Thank you. I cannot afford to lose web participants due to not having a preferred browser, so I think I’m going to switch (back) to instructing them at the end of the survey to “Please select OK when prompted”.
If y’all happen to update this if/when that gets resolved, I would love to update my code! Thanks for reading.