Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Bootstrap input change color
#1
Hi,

I'm just starting to use IW with bootstrap and of course struggling with basics. 
I have an input field that I would like to change label and text input color from black to red in case user puts wrong information. I can't find any information how could this be achived. Can somebody please explain it to me how can I do that?

Kind regards,
Bostjan
Reply
#2
Hi!

Since I haven't received any reply I guess I haven't ask clearly enough. 

Is it possible to programmaticaly change color of label/input in bootstrap? If yes, how?

Kind regards,
Bostjan
Reply
#3
>>Is it possible to programmaticaly change color of label/input in bootstrap?

Yes.  Here's how I do it (in async events):

Code:
WebApplication->CallBackResponse->AddJavaScriptToExecuteAsCDATA("$('#LBLSTATS').removeClass('text-info');$('#LBLSTATS').addClass('text-danger');");

Another way:

Code:
WebApplication->CallBackResponse->AddJavaScriptToExecuteAsCDATA("$('#EDNAME').css('background-color', 'red');");


Regards,
Mark
Reply
#4
Thank your for your answer.
I'm using Delphi, any chance explaning me how to put that in Delphi code?

Kind regards,
Bostjan
Reply
#5
Hi. In Delphi:
Code:
WebApplication.CallBackResponse.AddJavaScriptToExecuteAsCDATA("$('#LBLSTATS').removeClass('text-info');$('#LBLSTATS').addClass('text-danger');");
Code:
WebApplication.CallBackResponse.AddJavaScriptToExecuteAsCDATA("$('#EDNAME').css('background-color', 'red');");
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)