Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 2355

Re: How to set the value state of Select control?

$
0
0

Hi,

 

Yes, you can do it through style sheet.

 

Here is the logic you can try:

var selObject = get the select control.

 

if(value is blank or empty) {

  selObject.removeStyleClass("selectNormalValueState");

  selObject.addStyleClass("selectErrorValueState");

} else {

  selObject.removeStyleClass("selectErrorValueState");

  selObject.addStyleClass("selectNormalValueState");

}

 

Below is CSS:

.selectErrorValueState{

      border-width: 2px;

      border-style: Solid;

      border-color:  #CC0000;

      background-color: #FFDDD9;

      padding: 0 0.6875rem;     

}

.selectNormalValueState{

    color: #000000;

    background-color: #ffffff;

    border: 1px solid #c0c0c0;   

}

 

Hope this might help.

 

Thanks,

Dheeram


Viewing all articles
Browse latest Browse all 2355

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>