Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 

How to create deleteCookie() function in JavaScript

With the help of javascript, I have created deleteCookie() function. In the code given below, I have stored all the values in a single cookie and then used deleteCookie() function for deleting the cookie. When the cookie session expires, previous...

How to create conditional display using AngularJS

With the help of AngularJS, I have created a conditional display function. In the example given below, I have used ng-show( for showing the element ) and ng-hide( similar to 'display:none' or hide the element ) derivatives. HTML- <!DO...

How to create dynamic checkbox using JavaScript

With the help of JavaScript, I have created a dynamic checkbox function. When i will click on create button it will dynamically create a checkbox item list and by clicking on checkbox item it will be removed easily. <html> <head> ...

How to Add and Remove items in array using AngularJS

With the help of Angularjs, We can dynamically add or remove list items in an array. It is shown In the example given below.     Addition of the list items is done using 'push' method and removal of the item is done...

How to set Cookie() function in JavaScript.

With the help of javascript i have created set Cookie() function. In the below code I have store all the values in the single cookie. By using this function many cookies will store at a time. <script type="text/javascript"> var today ...

How to create JavaScript confirm Model

In the code given below, i have created a javaScript Confirm Model with the help of bootstrap. I also used document ready event handler to trigger the event.Confirm model without a callback isn't particularly useful,but it is entirely possible ...

Jquery Return false, event.preventdefault and event.stopPropagation

Return False :- Basically returning false is a way to tell your action (like button click event, submit and load etc. ) is not firing. Return false do the three basic things event.preventDefault(); event.stopPropagation(); Stops the call...

How to Dynamically add element in DropDownList?

I have created a dropdownlist with the help of Jquery and javascript. In this, when we will enter the text in the field given, that value will be stored and will be added to the next list dynamically. Also We can easily remove all the items by ju...

How to use loading and saving data from the local storage

In below code, I have used a constructor shoppingCart for the parameter CartName which identifies the Cart while loading data from the local storage. I have also used clearItems() function which is used to clear the cart and saveItems which is u...

How to create window.prompt Method

With the help of this javascript prompt() function, I have created a dialog box that will be used for taking user input. The prompt() method displays a dialog box that prompts the user to input data <!DOCTYPE html> <html> <h...

Open Android App from Web Browser & Get Data from The App & Return Back to Web Browse

Sometime we a have a situation in which we use android app in our web application.In that situation you can use this. For opening the android app first we have to check 2 conditions . 1. If the device is android or not. 2. In the android dev...

How to use Animated AJAX Record deletion in jQuery?

With the help of jQuery we can delete link for any record. On below code we have add a click event to triggers the ajax request. when the ajax request returns get success response. $(document).ready(function() { $('a.delete').click(fu...

How to show multiple items in a textbox, using auto completion in Javascript

"How to show multiple items in a textbox, using auto completion in Javascript" In this article we will make a project that will select multiple items from the autocomplete list and display them in the textbox as tags using Javascript. For ...

Prototypical inheritance in javascript

prototypical inheritance... We have used many different types of inhertance which are based on classes but today we are going to discuss the prototypical inheritance in javascript. It is based on objects, you can simply inherit one object to othe...

script for copy to clipboard

Copy to clipboard.. You can see this option in most of the blogs. You can simply click on the link and it will copy the text which set as target. Today we are going to discuss the implementation of this feature. We can see different ways to do th...

How to create Generated Keyframes in Javascript

Hello friends, I am sharing a generated keyframe with you . In this code I have set an animation on a DOM element . I have used insertRule for dynamically adding CSS and <style> tags for making it easier to remove the animation once the...

How to Create Real Time Changing Clock

With the help of javascript we can create changing clock time function. In the example given below I am using setTimeout function (changed other value) when clock refresh it will show the exact time once in every seconds. <html> <hea...

Get the device which is used by the user

Sometimes we have to write down the different scripts for different devices. Now a days most used devices are mobiles/tablets. If you want to get the device type which user is using then you need to simply add this script in your code and call th...

Email validation in javascript

If you are creating web forms then you need to put the validation in your form. We are here to discuss the validation for email. We know email address has its own structure. For eg. anytext@domain-main.com or anytext@domain-name.co etc We are g...

Foreach loop in javascript

If we need to use foreach loop in javascript then we can use jQuery $.each() function: var data = []; data[1] = "Mike"; data[2] = "Tom"; data[5] = "Harry"; data[12] = "John"; $.each(data, function( index, value ) { alert( index + ": " ...

autocomplete function with php

Jquery is a powerful library and it is heart of web develepment. It includes different types of functions. Today we are going to discuss function named autocomplete() which is useful to auto populate the suggestions as user types, filtering a...

Remove/add list using ng-click

Here is an simple example to add and delete list using angular ng-click Html - <div ng-app="nameApp" ng-controller="TitleCtrl"> <ul> <li ng-repeat="name in names">{{name}} <a href="" ng-click="removeN...

Check if an element is visible in viewport

Hi Friends, Many times we get into a situation where we want to know whether an element exists within a viewport of browser or not. Here below. I am writing a function to check whether an elements exists in a viewport or not. It will return...

Tutorial-4 AngularJS Controllers

Angular controllers control the data flow in application. Controller is defined by ng-controller. We define all script, function in the controller, every controller have their scope which works as parameter and that controller is applied on thei...

A numeric only text box in web application

A lot many times when creating web applications it so happens that we need to accept numeric vales i.e. which accepts positive, negative numbers , whole numbers or decimal numbers. Its easy, show a message on the page that the particular field ne...

Routing in AngularJS

Hi all, Here is an example, how to use Routing. We can use .config() to configure $routeProvider and in the same file we define two controllers firstController and SecondController. Usually these controllers holds a lot of logic but for ex...

How to Create a Responsive Image Slider in jQuery

By using jquery image slider plugin we can create Responsive Image slider .In below example, I am using rslider plugin. Step-1. Link files <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script> &l...

How to use getElementById() method in javascript

In the example given below document.getElementById returns a reference to our HTML element myText. We store this reference into a variable 'myTextField', and then use the 'value' property, that all input elements use to grab the value. <scr...

What is Bootstrapping in AngularJS?

Hi all, Bootstrapping is the equivalent of starting, or initializing your Angular app. There are 2 ways to do so. First :- <html ng-app="appName"> - - </html> Second:- After creating your app, you should use this when ...

How to use RouteProvider in AngularJS

With the help of Routing method we can divide our application in logical views and bind different view to controllers". In below example we have use first config() method to define $route Provider configuration. Also in the same file we defined t...

How to use Generic bind() Function

Here's an example of a generic bind() function, applied directly to an anonymous event handler. The object in XML Request gets bound to its onreadystatechange() event. The search string variable is being pre-applied as well. when the parseMes...

looping list using ng-repeat

Hi folks, The below example will demonstrate how to do looping over lists in templates using ng-repeat. <html ng-app="nameApp"> <head> <meta charset="utf-8"> <title>Angular.js Example</title> ...

Initializing the model using an Angular controller

Hi all, Below example will demonstrate, How to Initializing the model using an Angular controller, defined with a global function. <html ng-app="nameApp"> <head> <meta charset="utf-8"> <title>Angular.js ...

How to use Phonegap SoftKeyboard Plugin for Android?

Hello All, Here I am sharing some information to include and use of the SoftKeyboard Plugin for Android. 1.Install SoftKeyboard plugin using the latest version from GitHub: $ cordova plugin add https://github.com/phonostar/PhoneGap-Soft...

How to Update Marker position on google map

By using this function when we will click on Marker, its location will be shown on tha map. Here we have a function , first we will create "infowindow" object outside the function (global scope), then we will make infowindow objec constructor...

Clicking on marker generate popup on google map

By using this function, when we will click the marker, a popup will be shown on map. Here we have a function , first we will assign the content to a string name, then we will pass that value to the function . Watch below:- function initializ...

Fetching JSON using angular JS

The controller defines a dependency to the $scope and the $http module. An HTTP GET request to the countries.json end point is carried out with the get method. It returns a $promise object with a success and an error method. Once successful, the ...

Rollover with a Mouse Event

With the help of JavaScript and html we create a "Rollover with a mouse event" function. Here we have two images. when we place mouse over image(1), the image(1) changes to image (2) and when we move the mouse away from that image, the original i...

Change Browser URL without reloading using JavaScript

This will change the browser without refreshing and reloading page. In this code I have used four buttons for calling a function to changeUrl concurrently this function will also accepts the page Title and URL as parameters . Below is th...

MongoDB : Javascript function

MongoDB - Javascript function $where operator : It uses to either a string containing a JavaScript expression. The full JavaScript function also used in the query system. This feature available after MongoDB version >= 2.4. List of prop...

Google Map integration in PHP to Calculate Latitude and Longitude

This code will calculate the latitude and longitude of the place in background on entering the place name. For integration of Google map to calculate Latitude and Longitude major script is : <script src="https://maps.googleapis.com/maps/...

Difference between shift(), unshift() and push(),pop() methods

Writing a JavaScript code in correct approach can be fun instead of terrifying. In this tutorial we will see shift(), unshift() and push(), pop() are the methods of JavaScript that allows us to add remove elements.  Lets discuss all these m...

How to use Filter in Angular JS

A filter is used to format the value of some expression when it is displayed to the user. It can be think as selecting the elements from an array in a particular format and returns a new array. It can be used by the following ways: In HTML ...

Ajax call using Javascript and JQuery

Ajax : It is s process of getting or reteriving the content without refreshing the whole page. We can do this using javascript and JQuery. There are different method for ajax call in javascript and jquery. Javascript : <script...

How to get Geolocation (Lattitude and Longitude) of a point in phonegap

If you want to track the location using phonegap App, you can simply checkout this steps. 1. After creating a project for example "test", you can add a plugin using terminal cordova plugin add org.apache.cordova.geolocation After inst...

How to append/add set of input field in a form with just once click?

I designed my form with writing this script below. In this script showing $(wrapper).append() will trigger the action of adding the input boxes or any thing that you put inside it. For ex I used name, email and phone input text boxes. All you ju...

Select multiple elements with same ID using JQuery

ID's in HTML are generally used as unique identifiers for the elements present in the DOM but it is not a compulsion to have only one element with a unique ID, which means you can have multiple elements with the same ID. JQuery selector $("#id...

How to fetch server data into a div using jquery

Hi, in this blog you will learn how the load function in jquery, Used to fetch data from any server to any web page using selectors. <p><script> $(document).ready(function(){ $("button").click(function(){ ...

How to hide particular div with just one click?

Hi, you want a condition in which the particular div, para or any other tag need to be disappear with just a single click see my code written in jquery as simplest. <script> $(document).ready(function(){ $("p").click(function()...

Randomization of the colors

Web color can be expressed in hexadecimal , or as RGB value. With the RGB value, each color is represented as a number between 0 and 255. The example demonstrates one technique to generate a color, using one function to randomly generate the numb...
1 10
Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: