The LimeSurvey Fund-Raiser 2012 is complete. Thank you for donating a total of 25,000 USD!     List of donors »

Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: 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? 5 months 4 days ago #90182

  • Sweden
  • Sweden's Avatar
  • OFFLINE
  • Senior Lime
  • Posts: 62
  • Karma: 1
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?
Last Edit: 5 months 4 days ago by Sweden.
The administrator has disabled public write access.

Re: I need to change the name of one "NEXT" button - what is wrong with this code? 5 months 2 days ago #90215

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 2853
  • Thank you received: 423
  • Karma: 243
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

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
The administrator has disabled public write access.

Re: I need to change the name of one "NEXT" button - what is wrong with this code? 5 months 2 days ago #90252

  • Sweden
  • Sweden's Avatar
  • OFFLINE
  • Senior Lime
  • Posts: 62
  • Karma: 1
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 ;)
The administrator has disabled public write access.

Re: I need to change the name of one "NEXT" button - what is wrong with this code? 5 months 2 days ago #90256

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 2853
  • Thank you received: 423
  • Karma: 243
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

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
The administrator has disabled public write access.
The following user(s) said Thank You: Sweden

Re: I need to change the name of one "NEXT" button - what is wrong with this code? 5 months 2 days ago #90257

  • Sweden
  • Sweden's Avatar
  • OFFLINE
  • Senior Lime
  • Posts: 62
  • Karma: 1
Thanks, that did it! What advantages are there with the new buttons?
The administrator has disabled public write access.

Re: I need to change the name of one "NEXT" button - what is wrong with this code? 5 months 2 days ago #90259

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 2853
  • Thank you received: 423
  • Karma: 243
The new buttons allow for icons and other jQuery UI effects.
Cheers,
Tony

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
The administrator has disabled public write access.
  • Page:
  • 1
Moderators: DenisChenu, ITEd
Time to create page: 0.185 seconds
Donation Image