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: