Check out the LimeSurvey source code on GitHub!
Welcome, Guest
Username: Password:

TOPIC: JavaScript Problem with Next-Button

JavaScript Problem with Next-Button 5 years 1 month ago #67136

  • Veve
  • Veve's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 6
  • Karma: 0
Hello everyone,

at the moment I'm doing a questionnaire in 1.91+.
There I need the following programmed:
After a total of 4 Minutes the question field is deactivated.
The next>>> -button is disabled for 3 minutes, after this time it is activated (so that the participants who have finished this question earlier may proceed) and there comes a warning that there is 1 minute left.

I tried programming this feature in JavaScript. However, so far only the text "Warnung" appears however the next>>> button isn't doing anything.

This is the source code I used:

<script language="JavaScript">
var Aktiv=setTimeout("warnung()",180000);//180000

function warnung(){

// End -->

What is wrong with the code? :unsure:
Is it possible to alter the next button!

Thank you very much!!

The administrator has disabled public write access.

JavaScript Problem with Next-Button 5 years 1 month ago #67163

  • tpartner
  • tpartner's Avatar
  • Online
  • LimeSurvey Team
  • Posts: 6567
  • Thank you received: 1477
  • Karma: 579
I think the main problem is that you are firing the script before all page elements have been loaded.

This script uses jQuery shortcuts and also waits until the page is fully loaded before doing anything.
<script type="text/javascript" charset="utf-8">
	$(document).ready(function() {
		$('#movesubmitbtn').attr('disabled', true);
		setTimeout(function() {
		}, 180000);
		function warnung(){
			$('#movesubmitbtn').attr('disabled', false);
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Last Edit: 5 years 1 month ago by tpartner.
The administrator has disabled public write access.
Time to create page: 0.527 seconds
Imprint                   Privacy policy         General Terms & Conditions         Revocation information and revocation form