Friday, September 7, 2012

CSS and Javascript tips

I learned 2 interesting things today.

1. After you apply custom style sheet to your content in SharePoint, it is still not getting applied when you check in browser. The reason for that is the SharePoint overrides your style (css class). To over come this situation, you can declare your styles in css class as !important. This lets SharePoint know that your css class is priority.

    font-family: Arial !important;
    font-size: 9pt !important;

2. If you want to execute javascript code after successful validation of controls (required field validator etc...) you need to write a small javascript function which calls Page_ClientValidate to fire validation and get its status (successful - true; unsuccessful-false).

and here is the button markup...

Happy Coding
Vighnesh Bendre

1 comment:

Pawel Co Faddey said...

Hi, Great.. Tutorial is just awesome..It is really helpful for a newbie like me.. I am a regular follower of your blog. Really very informative post you shared here. Kindly keep blogging. If anyone wants to become a Front end developer learn from Javascript Training in Chennai . or Javascript Training in Chennai. Nowadays JavaScript has tons of job opportunities on various vertical industry. ES6 Training in Chennai