0

Here is my code:

$("#autogeneraterfid2").change(function () {
  // debugger
  if ($("#autogeneraterfid2").is(':checked')) {
    var kButton = $("#btnsaveprint").data("kendoButton");
    kButton.element[0].innerText = "Save and Program RFID";
  } else {
    var kButton = $("#btnsaveprint").data("kendoButton");
    kButton.element[0].innerText = "Save & Print";
  }
});

On checkbox change am changing the innerText of kendo button. This works fine in IE and Chrome whereas in Firefox it is not working.

Can anyone tell me what is the exact problem?

Oriol
  • 274,082
  • 63
  • 437
  • 513
Karthik
  • 207
  • 15
  • 38
  • create a fiddle and post your html code – chris Jul 08 '14 at 06:53
  • 2
    try using innerHTML rather than innerText. I have seen this happen before where one works in one browser and doesn't work in an other browser. innerHTML still works in IE and Chrome – David Shorthose Jul 08 '14 at 07:00
  • Possible duplicate of ['innerText' works in IE, but not in Firefox](http://stackoverflow.com/questions/1359469/innertext-works-in-ie-but-not-in-firefox) – Oriol Nov 29 '15 at 19:54

1 Answers1

2

Here is a fiddle with a possible solution. http://jsfiddle.net/YF49U/

This is using the kendo button demo as a template and then just hooking your code onto the first primary button.

You will notice that I changed the lines:

kButton.element[0].innerText =

to

kButton.element[0].innerHTML =
David Shorthose
  • 4,489
  • 2
  • 13
  • 12