Creating a Banner
Jump to navigation
Jump to search
Using QScript to create a Banner question called Demographic banner. In most cases it is not necessary to create banners with a script because banners can be created using Create > Banner > Drag and Drop. This example uses C:\Program Files\Q\Examples\Phone.sav (this may be located on a different place on your computer depending upon how Q was installed).
Note that:
- The new Question that is constructed in the Q Project has the name Demographic banner.
- The banner contains three non-nested questions: Age, Gender and Work status. We can see that they are not nested by the square brackets surrounding each of the calls to the questions. By contrast, the following script nests gender within age:
See also
- Next worked example.
- QScript for an explanation of how to run this code.
- QScript Examples Library for other examples.
- QScript Reference for technical information.
- JavaScript for information about the JavaScript programming language.
- Table JavaScript and Plot JavaScript for tools for using JavaScript to modify the appearance of tables and charts.
- JavaScript Variables for detail on how to create new variables in the Variables and Questions tab using JavaScript.