Skip to content

Link Block

The link block provides the ability to present the participant with a clickable link to an external website or webpage. A link block has to be specified within a stimulus block. The structure of this block is summarised below.

Note

If a participant clicks on a link, a confirmation dialog will appear asking if they want to visit the external website. If the website is opened, it will do so in a new browser tab and the ROLEG experiment will remain open and active in the original browser tab. Therefore, make sure to either instruct the participant they should, after visiting this website, continue the experiment, or close the experiment browser tab if this block is the end of the experiment.

Parameters

url
Required.
String that specifies the URL of an external link. The url cannot be empty and has to link to a valid HTTP or HTTPS webpage.
name
Optional, defaults to the value of url.
String that specifies the name shown on the external link. This should be representative of the website referenced by url. The name cannot be empty.

Example usage

The code below illustrates how the link block might be used.

experiment {
    trial {
        stimulus {
            link {
                url = "https://www.google.nl"
                name = "Go to Google"
            }
        }
        response {
            button = "Continue experiment"
        }
    }
}
Back to top