Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
en:create:frameset [21.09.2015 12:36] mkgkielen:create:frameset [01.06.2022 19:57] (current) – [Define a frameset] admin
Line 1: Line 1:
-===== Play music along several pages =====+====== Play music along several pages ======
  
 SoSci gives you the opportunity to present music or videos along the whole qustionaire by means of a frameset. How this works is shown below.((Thanks to [[sbrand@students.uni-mainz.de|Sebastian Brand]] for this chapter.)). SoSci gives you the opportunity to present music or videos along the whole qustionaire by means of a frameset. How this works is shown below.((Thanks to [[sbrand@students.uni-mainz.de|Sebastian Brand]] for this chapter.)).
Line 8: Line 8:
 The first step is to create a frameset in SoSci Survey. Click [[http://wiki.selfhtml.org/wiki/HTML/Frames|SelfHTML: Frames]] to see what a frameset is. Loosley speaking a frameset is a table, which devides a website into areas, whereas the contents can be worked on individually.  The first step is to create a frameset in SoSci Survey. Click [[http://wiki.selfhtml.org/wiki/HTML/Frames|SelfHTML: Frames]] to see what a frameset is. Loosley speaking a frameset is a table, which devides a website into areas, whereas the contents can be worked on individually. 
  
-To generate a frameset in SoSci Survey a text file has to be created on the desktop. Name it e.g. “Start.html”.+To generate a frameset in SoSci Survey a text file has to be created on the desktop. Name it e.g. “start.html”.
  
 **Important:** It is crucial saving the file as a pure ASCII-text. Due to this it is necessary to use a text editor (e.g. [[https://notepad-plus-plus.org/|Notepad++]], [[http://www.scintilla.org/SciTE.html|SciTE]] or Windows note pad) but __no__ word processor such as MS Word or OpenOffice/LibreOffice. **Important:** It is crucial saving the file as a pure ASCII-text. Due to this it is necessary to use a text editor (e.g. [[https://notepad-plus-plus.org/|Notepad++]], [[http://www.scintilla.org/SciTE.html|SciTE]] or Windows note pad) but __no__ word processor such as MS Word or OpenOffice/LibreOffice.
Line 14: Line 14:
 **Important:** Take care that the file extension is changed respectively, converting the former text file into an html-file. The file should now contain the following html-code: **Important:** Take care that the file extension is changed respectively, converting the former text file into an html-file. The file should now contain the following html-code:
  
-<code html>+<file html start.html>
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd"> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
 <html> <html>
Line 26: Line 26:
   </frameset>   </frameset>
 </html> </html>
-</code>+</file>
  
 Watch out for the line ''<frame src=...'' -- your individual questionnaire-URL should be taken down here ([[:en:survey:url]]) in order to start the questionnaire in the frame. According to personal needs and preferences the following changes in the code can be made additionally: Watch out for the line ''<frame src=...'' -- your individual questionnaire-URL should be taken down here ([[:en:survey:url]]) in order to start the questionnaire in the frame. According to personal needs and preferences the following changes in the code can be made additionally:
Line 40: Line 40:
 **Important**: Do __not__ upload the protected filestorage! **Important**: Do __not__ upload the protected filestorage!
  
 +Test whether you can open the URL ''%%https://www.soscisurvey.de/PROJECT/start.html%%'' in the Internet browser, and if that leads you to the questionnaire. Instead of ''PROJECT'' you have to use you project's folder, of course ([[:en:survey:url]]).
  
 ===== Prepare Frame content ===== ===== Prepare Frame content =====
Line 45: Line 46:
 The next step ist o decide what kind of content shall be uploaded to a frame. The frame should fit for a video in order to see it completely. In case of music it should be rather small so it doesn’t hide the questionnaire itself. If you know what contents ist to be added to the frame th following steps have to be taken; Create a new txt i.e. HTML file on the desktop e.g. ''play.html''. Edit file and add the HTML code which will play the contents. Here an example for music: The next step ist o decide what kind of content shall be uploaded to a frame. The frame should fit for a video in order to see it completely. In case of music it should be rather small so it doesn’t hide the questionnaire itself. If you know what contents ist to be added to the frame th following steps have to be taken; Create a new txt i.e. HTML file on the desktop e.g. ''play.html''. Edit file and add the HTML code which will play the contents. Here an example for music:
  
-<code html>+<file html play.html>
 <!DOCTYPE html> <!DOCTYPE html>
 <html lang="de"> <html lang="de">
Line 53: Line 54:
   </head>   </head>
   <body>   <body>
-    <audio id="bgAudio01" preload autoplay>+    <audio id="bgAudio01" preload autoplay style="position: absolute; left: -9999px; top: -9999px">
       <source src="EXAMPLE.MP3">       <source src="EXAMPLE.MP3">
     </audio>     </audio>
   </body>   </body>
 </html> </html>
-</code>+</file>
  
 Here the audio file was attached by ''<audio>''-tag, which is supported by most browsers. Attaching by flash player is explained here: [[:en:create:media]] Here the audio file was attached by ''<audio>''-tag, which is supported by most browsers. Attaching by flash player is explained here: [[:en:create:media]]
  
-The music file („EXAMPLE.MP3“) has to be uploaded to SoSci Survey likewise. Setting the player’s pixel size to zero lets the player disappear leaving the music playing (e.g. 110 pixel). Now the edited file has to be loaded up to the project’s directory as well.+The music file („EXAMPLE.MP3“) has to be uploaded to SoSci Survey likewise. Setting the player’s pixel size to an absolute negative range (e.g. -9999px) lets the player disappear leaving the music playing. Now the edited file has to be loaded up to the project’s directory as well.
  
 +**Tip:** To determine the name of the audio file, go to Pictures and Files in the questionnaire menu of your project, there you will find the full name, which you can simply copy (usually the name under which you uploaded the file).
  
 ===== Load frame contents ===== ===== Load frame contents =====
  
-Probably the audio file is not meant to play from the beginning but rather start at some point later on. For this purpose copy the file ''play.html'' via JavaScript to the little frame. This is achieved by creating a new text fragment in **Text fragments and Labelling** containing the following:+Probably the audio file is not meant to play from the beginning but rather start at some point later on. For this purpose copy the file ''play.html'' via JavaScript to the little frame. This is achieved by creating a new text fragment in **Text Elements & Labels** containing the following:
  
 <code html> <code html>
Line 93: Line 95:
  
  
 +===== Send Questionnaire with Frameset =====
 +
 +To make full use of the frameset, the link to the questionnaire must be completed with the ending /start.html (or the individual name of your frameset). You should not forget this, otherwise it will not work. How the link to the questionnaire is composed you can read here: [[en:survey:url|]]
 ===== Limitations ===== ===== Limitations =====
  
   * While loading the frame set it is not possible to transmit variables (e.g. reference or serial number) to the questionaire, as mentioned here: [[:en:survey:url]].   * While loading the frame set it is not possible to transmit variables (e.g. reference or serial number) to the questionaire, as mentioned here: [[:en:survey:url]].
   * Using this solution fading the music is not feasible. It is cut out abruptly loading the empty file.   * Using this solution fading the music is not feasible. It is cut out abruptly loading the empty file.
en/create/frameset.1442831788.txt.gz · Last modified: 21.09.2015 12:36 by mkgkiel
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
Driven by DokuWiki