Business Website Archives - Page 4 of 11

How to access javascript array in php on submit

Author - Kritika Sood

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 create a hidden variable in HTML. This variable will Read more…

PHP – Possible reasons of “Allowed memory size exhausted” error

Author - Rita

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 could be the reason behind the error. Some examples Read more…

Selenium Webdriver | Locating elements

Author - Webner

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 in the code. Java statement for this will Read more…

How to add combobox in editable datagrid using jQuery EasyUI

Author - Webner

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>
&lt Read more…

JQuery | Change background color on hover

Author - Webner
|
0 Comments
|

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 green, like shown in 2nd image:

This is the sample Read more…

3 special features of jQuery

Author - Richa
|
0 Comments
|

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 Read more…

Background colors of CSS shapes not showing with window.print()

Author - Kritika Sood

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 shown. It was working when viewed on browser.

The Read more…

PHP | Adding text over an image

Author - Richa

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 image
$txt = “Here goes the text to Read more…

PHP | better way to include a file

Author - Kiran Preet

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 Read more…

PHP | How to install CakePHP 3.0

Author - Deepika

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 installer in your Read more…

HTML | Using CSS for animation

Author - Webner
|
0 Comments
|

With recent evolution in CSS, we can try animations. Below is a sample code where in which have used latest CSS features and will give the illusion of animation. Just copy paste the code below in an HTM file and and view it in browser.

Code:

<html>
&lt Read more…

jQuery | Get and change link using near by class or Id value

Author - Webner
|
0 Comments
|

In one of our projects we are working on, we faced a problem where we wanted to change the HREF attribute value of anchor tag using jQuery. When we inspected the HTML code no unique id, name or class was given to < a href > element.

So how to Read more…

Introduction to Heroku

Author - Webner

Heroku is an all-in-one cloud based platform which allows software developers to develop and host applications over Heroku cloud. The company was setup in June 2007 which initially supported Ruby programming language. Later on, support for other programming languages such as Node.js, Java, PHP, Python, Scala, Go Read more…

Transition Delay Property in CSS and Javascript

Author - Ishpreet Kaur

What is Transition Delay?

Transition delay specifies the amount of time for the change to take place in css properties of DOM elements. Transition Delay value is defined in seconds (s) or milliseconds(ms).

How to implement Transition Delay in CSS Read more…

Localhost WordPress site asking for FTP credentials on installing new plugin

Author - Neelam

In one of the WordPress projects we are working on, whenever we tried to install a new plugin in locally installed WordPress, it asked for FTP credentials:

When we tried to install a new theme then also it asked for the same:

Actually, the problem was Apache web server was Read more…

What is in Bootstrap apart from grid system? Why it has a Javascript file also?

Author - Neelam

Bootstrap has lots of other things apart from grid system such as:

1. Glyphicons: Bootstrap has inbuilt icons which we can use by icon’s class name.

For Example: “glyphicon-search” will create search icon without using any external image. So Read more…

Microsoft SQL Server | MySQL LIMIT equivalent in Microsoft SQL Server

Author - Kailash
|
0 Comments
|

Suppose you want to retrieve values from row from 5 to 10 from a table in SQL server. Since LIMIT keyword does not work in it so we can use any of these 2 alternative methods:

Solution 1 :

SELECT * FROM ( SELECT *, ROW_NUMBER() OVER (ORDER BY name) as row FROM TableName Read more…

CakePHP bake: SQLSTATE[42S02]: Base table or view not found

Author - Rita

While running cake bake command for cakephp 3.0 we got the following error:

SQLSTATE[42S02]: Base table or view not found: 1146 Table ‘tablename .columnname’ doesn’t exist

The culprit was a column with name test_id in one of the tables. As per bake command’s conventions about foreign Read more…

Heroku | Change PHP session timeout

Author - Webner

In Heroku, there is no way to change HTTP session timeout (or some other php.ini settings) from user interface. For this create a file with name .user.ini and specify the properties in it. This file is to be created in root folder of project.

In our case we Read more…

Font family looks regular in Ubuntu and Windows but looks bold in Mac

Author - Kajal Marwaha

In one of our web development projects, we used font family named Calibri for breadcrumbs. This font worked fine on Ubuntu and Windows but on each browser of Mac fonts appeared bold.

We wrote the following code for making the text font normal and consistent for all operating systems:
.breadcrumb Read more…

‹ Prev page1 2 3 4 5 6 7 8 9 ... 11 Next page ›