This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal



Jun 4, 2013, 3:53 PM
4 Posts
topic has been resolvedResolved

Computed Style

  • Category: Server Side JavaScript
  • Platform: Windows
  • Release: 8.5.3
  • Role: Developer
  • Tags: error style css
  • Replies: 3
 Hi,

I want to switch the style for a panel for mandatory fields. 
- In the new opened form our standard-style
- If the field-validation fails I want to apply another css with some highlightings. 

I know I can compute the style, but how can I check the validation-status for the component?

Best regards 
Joerg 
Jun 4, 2013, 4:06 PM
366 Posts
Re: Computed Style
 If you are doing client side validation then you can use any of the following dojo classes to alter the class associated with the componenent



dojo.addClass

Adds a CSS class to a node.

dojo.removeClass

     Removes a class from a Node.

dojo.toggleClass

Toggles a className.


 
Jun 5, 2013, 7:26 AM
4 Posts
Re: Computed Style
Forgot to mention it: We need Server-side validation.

 
Jun 5, 2013, 2:36 PM
17 Posts
Re: Computed Style
Invalid fields has the attribute '[aria-invalid]' with value 'true'. So in your style sheet, you can apply style for them, like below:

  [aria-required=true] { background-color: red; border-color:white}

This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal