Category: Mobile
PHP | Convert Special Characters to HTML entities without using htmlspecialchars( ) function
We can’t use special characters like >,<,”,’ etc directly in code because browser mixes these characters with HTML tags and gets confused. So we can use HTML entities if we want to use special characters in our code. Below are
Bootstrap | How to show Caret symbol on hover event
How to show Caret symbol on hover event in the Bootstrap navigation bar as shown in the figure below: Solution: We created a bootstrap navigation bar with ul and li tags. One of the li element within the ul for
How to access javascript array in php on submit
Suppose you have a Javascript array and want to send it to the server side on page submit then you can use this method. Suppose we have a Javascript array with 3 elements: var test = [“test1”, “test2”, “test3”]; Now
PHP – Possible reasons of “Allowed memory size exhausted” error
Most of the times when we get memory exhausted error, we normally think that the memory allocated for php program execution in php.ini file is not sufficient and raise this limit to try to fix the error. However, code inefficiency
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