Asynchronous Apex
Asynchronous Apex in Salesforce allows developers to execute operations in a separate thread, enabling tasks to run in the background without impacting the user experience. This approach is particularly beneficial for handling long-running processes, callouts to external systems, and operations
Selenium Webdriver | Locating elements
Selenium Webdriver lets us locate elements in a web page in many different ways. Some of them are: By id: If the HTML element to be located has a unique id one can use this id to locate the element
How to add combobox in editable datagrid using jQuery EasyUI
Following is the code to add Combobox in editable data grid: Index.html: <table id=”dg” title=” Combobox in editable datagrid ” style=”width:100%;height:700px” toolbar=”#toolbar” pagination=”true” rownumbers=”true” fitColumns=”false” singleSelect=”true” autoSave=”true” data-options=”pageSize:50″> <thead> <tr> <th field=”Item_number”width=”100″ editor=”{ Type:’combobox’, Options:{url:’get_itemname.php’, valueField:’itemno’, textField:’itemname’ }}”>Item Name</th> <th
JQuery | Change background color on hover
Suppose on an HTML page we have a list of menu items as shown in the image on the left below (Customers, Projects, Invoices etc) and on hover over these menu items we need to change the background color to
3 special features of jQuery
1. Fetching coordinates of current location of the mouse: Below is the code to retrieve the coordinates of the mouse at any position on the webpage and display inside a div with id getCoords: <script> $(document).ready(function() { $(document).mousemove(function(e){ $(‘#getCoords’).html(“X: “
Background colors of CSS shapes not showing with window.print()
In one of our projects we are working on, we were trying to print a page using Javascript window.print() method. Strangely the page was not showing the colors of various CSS shapes like rectangle, circle etc when print preview was
PHP | Adding text over an image
In order to add text over an image, following PHP code can be used. Read the comments to understand purpose of code statements: <?php header (“Content-type: image/jpeg”); //setting the content type //variable containing the string to be written on the
Salesforce | document.getElementById(‘id’).value not working for apex:outputtext
If you have an apex:outputtext and you try to get its value in Javascript using document.getElementById(‘id of outputtext’).value(), that won’t work. The reason is apex:outputtext is translated to HTML SPAN element. So <apex:outputtext value=”Amount” id=”amntId”/> becomes <span id=”amtId”>Amount</span> So to
PHP | better way to include a file
Have a look at this folder structure: Test Folder1 Abc.php Folder2 Qwerty.php Now in Abc.php file, try to include Qwerty.php using the following code: Abc.php include(‘../Folder2/Qwerty.php’) It will give this error: Fatal error: Failed opening required ‘../Folder2/Qwerty.php’ (include_path=’.:/usr/local/lib/php’) in /Test/Folder1/Abc.php
PHP | How to install CakePHP 3.0
These are the steps to install CakePHP 3.0 on Ubuntu machine: Make sure you have PHP 5.5.9 (CLI) or higher installed. Check php version on your system using this command: php -v Run the following commands: 1. Download the composer