Willkommen, Gast
Benutzername: Passwort: Angemeldet bleiben:

THEMA: I need to change the name of one "NEXT" button - what is wrong with this code?

I need to change the name of one "NEXT" button - what is wrong with this code? 1 Jahr 8 Monate her #90182

  • Sweden
  • Swedens Avatar
  • OFFLINE
  • Senior Lime
  • Beiträge: 64
  • Dank erhalten: 1
  • Karma: 2
Hi,

I use the autoload-URL option, so I want to change the value/label for just the last button from "next" to "EXIT".

I tried to insert this code (in the question source field):
<script type="text/javascript" charset="utf-8"> $(document).ready(function() {$('#movenextbtn').attr('value', 'EXIT');}) </script>

- doesn't do a thing. Why is that?
Letzte Änderung: 1 Jahr 8 Monate her von Sweden.
Der Administrator hat öffentliche Schreibrechte deaktiviert.

Re: I need to change the name of one "NEXT" button - what is wrong with this code? 1 Jahr 8 Monate her #90215

  • tpartner
  • tpartners Avatar
  • OFFLINE
  • LimeSurvey Team
  • Beiträge: 4139
  • Dank erhalten: 767
  • Karma: 348
If using LimeSurvey 2.0, for the "Next" button:
<script type="text/javascript" charset="utf-8">
	$(document).ready(function() {
		$('#movenextbtn .ui-button-text').text('EXIT');
	});
</script>

For the "Submit" button:
<script type="text/javascript" charset="utf-8">
	$(document).ready(function() {
		$('#movenextbtn .ui-button-text').text('EXIT');
	});
</script>
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.
Der Administrator hat öffentliche Schreibrechte deaktiviert.

Re: I need to change the name of one "NEXT" button - what is wrong with this code? 1 Jahr 8 Monate her #90252

  • Sweden
  • Swedens Avatar
  • OFFLINE
  • Senior Lime
  • Beiträge: 64
  • Dank erhalten: 1
  • Karma: 2
Thanks, but I reverted to normal buttons by adding the following to the end of template.js:
function navbuttonsJqueryUi(){
    // Just deactivate default jquery-ui button
}

I do some other stuff with the buttons so at this point I would hate to change to the new buttons (I actually tried, and some of it didn't work). Any suggestion to how I can change the old "Next" button? I thought my code above would work but it doesn't...

This is the last thing I need to get done before I can go online with my survey so I would appreciate your help very much. Thanks ;)
Der Administrator hat öffentliche Schreibrechte deaktiviert.

Re: I need to change the name of one "NEXT" button - what is wrong with this code? 1 Jahr 8 Monate her #90256

  • tpartner
  • tpartners Avatar
  • OFFLINE
  • LimeSurvey Team
  • Beiträge: 4139
  • Dank erhalten: 767
  • Karma: 348
In that case, you will need to change the button text along with the value:
<script type="text/javascript" charset="utf-8">
	$(document).ready(function() {
		$('#movenextbtn').attr('value', 'EXIT').text('EXIT');
	});
</script>
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.
Der Administrator hat öffentliche Schreibrechte deaktiviert.
Folgende Benutzer bedankten sich: Sweden

Re: I need to change the name of one "NEXT" button - what is wrong with this code? 1 Jahr 8 Monate her #90257

  • Sweden
  • Swedens Avatar
  • OFFLINE
  • Senior Lime
  • Beiträge: 64
  • Dank erhalten: 1
  • Karma: 2
Thanks, that did it! What advantages are there with the new buttons?
Der Administrator hat öffentliche Schreibrechte deaktiviert.

Re: I need to change the name of one "NEXT" button - what is wrong with this code? 1 Jahr 8 Monate her #90259

  • tpartner
  • tpartners Avatar
  • OFFLINE
  • LimeSurvey Team
  • Beiträge: 4139
  • Dank erhalten: 767
  • Karma: 348
The new buttons allow for icons and other jQuery UI effects.
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.
Der Administrator hat öffentliche Schreibrechte deaktiviert.
Moderatoren: ITEd
Ladezeit der Seite: 0.147 Sekunden
Donation Image