Randomly Generate Html Color Are you fed up of copying Hex color code and changing it again and again and do you want to Generate Html Color code randomly, you can acheive this using following javascript code. <script> function get_random_color() { var letters = '0123456789ABCDEF'.split(''); var color = '#'; for (var i = 0; i < 6; i++ ) { color += letters[Math.round(Math.random() * 15)]; } document.getElementById("in").setAttribute('style','background-color:' +color); } </script> I am generating the color randomly on click of button. <div id="d"> <input type="text" id="in"/> <input type="button" onClick="get_random_color();" value="generate"/> <...
Posts
Showing posts from November, 2013
- Get link
- X
- Other Apps
By
Unknown
-
Style your Button Fed up with your look and feel of your old buttons and wanted to add more appeal to your html button then I will show you the way to get rid of that old boring style button. In your Input button <input type="button" value="Button" id="btn" /> You just have add this CSS: and you will get a new Stylish button, modified it further as you want. Want to learn more, Go to http://www.red-team-design.com/just-another-awesome-css3-buttons
- Get link
- X
- Other Apps
By
Unknown
-
How to Use vLookup in Excel Many Times I find people struggling to use vLookup in excel as they find it difficult. So today I will tell you how can you use vLookup in Excel and for demo we will be using vlookup for two different Excel sheets. I have created two reports 1. Account with Contacts (Account and Contact.csv) 2. Account with Opportunity (Account and Opportunity.csv) and export them. We will use vLookup function to get Account Name From Sheet 2(" Account and Opportunity") to Sheet 1(" Account and Contact") Step 1.write =vlookup( in a cell where you want to find out the value. You can also try this with clicking fx present. Step 2. Click on cell A3 as we want to find out the Account name for that cell.On clicking you will see 'A3' automatically populated inside vlookup() function. Step 3. Now go to second sheet and select the columns where you want to search the Account name for t...
- Get link
- X
- Other Apps
By
Unknown
-
SFDC : Custom Message on Visualforce Many times when we creating our visualforce page, we want to our custom Information Message, Error or Warning on our visualforce page on satisfying some validation. Salesforce provide few messaging ways which are 1) apex:pageMessage : It is used to display single custom method using Salesforce formatting. we can decide its severity. on vF page severity can also be WARNING, INFO for more info go to : http://www.salesforce.com/us/developer/docs/pages/Content/pages_compref_pageMessage.htm 2) apex:pageMessages : It is used to display all messages on page, it will display all the custom messages as well as Salesforce generated messages on page. vf code: Controller : vF page looks something like this: have you noticed how pageMessages handles all the Error, Warning, Info messages on page, pageMessages is used mostly on vf page. for more info go to : http://www.salesforce.c...
- Get link
- X
- Other Apps
By
Unknown
-
Visualforce is a great for rapidly building web apps on top of Salesforce. One of the features of Visualforce is called "Satic Resource". It allows developers to add any custom Javascript, CSS and image files to Salesforce server and provide them a way to extend Visualforce capabilities to build different kinds of applications. Is is a good practice to write a Javascript and save in satatic resource and include it your code. Example : Suppose you are creating a page and have few buttons ( save, cancel ) on the page and you want to pop up a confirmation message when user click on cancel button. Then first create a file where you will writting all your javascript code. I have created confirm.js which contain my javascript code Saved that file in Static Resource, I saved my file in static resource with name wizradConfirm. and then include that in my visualforce code. (Highlighted in red)...