Willkommen, Gast
Benutzername: Passwort: Angemeldet bleiben:
  • Seite:
  • 1
  • 2

THEMA: insert game (code) from URL before questions appear

insert game (code) from URL before questions appear 10 Monate 2 Wochen her #103244

  • baszek
  • baszeks Avatar
  • OFFLINE
  • Fresh Lemon
  • Beiträge: 11
  • Karma: 0
tpartner schrieb:
Ah, my code is for 2.0. In 2.05, you can use something like this:
<script type="text/javascript" charset="utf-8">	
	$(document).ready(function() {
		$('#movenextbtn').click();
	});
</script>

Here is a survey you can try in 2.05:

Dateianhang:

Dateiname: limesurvey_survey_376655.lss
Dateigröße: 14 KB
This code works perfect! Thx a lot !
Letzte Änderung: 10 Monate 2 Wochen her von baszek. Begründung: some changes
Der Administrator hat öffentliche Schreibrechte deaktiviert.

insert game (code) from URL before questions appear 2 Wochen 1 Stunde her #114282

  • tomscher
  • tomschers Avatar
  • OFFLINE
  • Junior Lime
  • Beiträge: 24
  • Dank erhalten: 5
  • Karma: 2
Sorry for bumping up that old thread, but I have a similar problem:
I embed an external game in Limesurvey which should trigger the 'submit' function at the end. For that purpose, I do the following:

a) embed the game using iframe (no probs here)
b) hide the 'next' button of LS to avoid premature submissions (no probs here)
c) at the end of the game, I want to submit the LS-question group and go to the next question group (problem is here).

I have tried the following JS lines at the appropriate places (i.e. within a function that is called at the end of the game within the frame):

document.limesurvey.move.value = 'movenext';
document.limesurvey.submit();

Also not working: defining a function with the proposed "click"-Code from below in LS and calling this function (nextLSpage) from the frame using window.opener.nextLSpage();

Possibly it's a simple solution - I am just completely stuck and help is highly appreciated.

I use LS 2.05 and my first solution did work in previous versions (up from at least 1.92) - so what would be the new equivalent to automatically submit question groups from another frame?
Der Administrator hat öffentliche Schreibrechte deaktiviert.

insert game (code) from URL before questions appear 2 Wochen 47 Minuten her #114284

  • tpartner
  • tpartners Avatar
  • OFFLINE
  • LimeSurvey Team
  • Beiträge: 4362
  • Dank erhalten: 827
  • Karma: 381
Try this in the iframe:

$('#movenextbtn', window.top.document).click();


This sets the scope in which to search for "#movenextbtn" to the top window.



.
Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
Letzte Änderung: 2 Wochen 46 Minuten her von tpartner.
Der Administrator hat öffentliche Schreibrechte deaktiviert.
Folgende Benutzer bedankten sich: tomscher

insert game (code) from URL before questions appear 2 Wochen 30 Minuten her #114288

  • tomscher
  • tomschers Avatar
  • OFFLINE
  • Junior Lime
  • Beiträge: 24
  • Dank erhalten: 5
  • Karma: 2
Thank you! Works like a charm! :)
Der Administrator hat öffentliche Schreibrechte deaktiviert.
  • Seite:
  • 1
  • 2
Moderatoren: ITEd
Ladezeit der Seite: 0.137 Sekunden
Donation Image