Welcome, Guest
Username: Password: Remember me

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? 1 year 10 months ago #90182

  • Sweden
  • Sweden's Avatar
  • OFFLINE
  • Senior Lime
  • Posts: 64
  • Thank you received: 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?
Last Edit: 1 year 10 months 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? 1 year 10 months ago #90215

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 4270
  • Thank you received: 803
  • Karma: 368
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.
The administrator has disabled public write access.

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

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

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

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 4270
  • Thank you received: 803
  • Karma: 368
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.
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? 1 year 10 months ago #90257

  • Sweden
  • Sweden's Avatar
  • OFFLINE
  • Senior Lime
  • Posts: 64
  • Thank you received: 1
  • Karma: 2
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? 1 year 10 months ago #90259

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 4270
  • Thank you received: 803
  • Karma: 368
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.
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.120 seconds
Donation Image