Page 1 of 1

Button Text with JavaScript?

Posted: 20 Aug 2018
by slashmaster
Hi,

i am using some "Button" from Control-List. There is a Property called "Text" to set the displayed Button-Text.
How can i modify this in a Displayform with Javascript?

The button gots a css-class called "btn_one"
this is what i tried already:

Code: Select all

$(".btn_one").text("hello world"); //nothing happened
$(".btn_one").control()._el().text("hello world"); //error
$(".btn_one").value("hello world"); //error
$(".btn_one").html("hello world"); //nothing happened
$(".btn_one").hide(); //works for example, to hide the button
Some ideas? :) thanks in advanced

Re: Button Text with JavaScript?

Posted: 20 Aug 2018
by Dmitry Kozlov
Please, use the code below:
$('.btn_one').val('hello world')

Re: Button Text with JavaScript?

Posted: 21 Aug 2018
by slashmaster
Hello Dmitry,

works well, ty :-)