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

More
4 years 5 months ago - 4 years 5 months ago #90182 by Sweden
Sweden created the topic: I need to change the name of one "NEXT" button - what is wrong with th
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: 4 years 5 months ago by Sweden.

Please Log in to join the conversation.

More
4 years 5 months ago #90215 by tpartner
tpartner replied the topic: I need to change the name of one "NEXT" button - what is wrong with th
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.

Please Log in to join the conversation.

More
4 years 5 months ago #90252 by Sweden
Sweden replied the topic: I need to change the name of one "NEXT" button - what is wrong with th
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 ;)

Please Log in to join the conversation.

More
4 years 5 months ago #90256 by tpartner
tpartner replied the topic: I need to change the name of one "NEXT" button - what is wrong with th
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.
The following user(s) said Thank You: Sweden

Please Log in to join the conversation.

More
4 years 5 months ago #90257 by Sweden
Sweden replied the topic: I need to change the name of one "NEXT" button - what is wrong with th
Thanks, that did it! What advantages are there with the new buttons?

Please Log in to join the conversation.

More
4 years 5 months ago #90259 by tpartner
tpartner replied the topic: I need to change the name of one "NEXT" button - what is wrong with th
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.

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now