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

All date formats in Javascripts

Hello Reader's If your website getting the dates in different different date formats. Then you can see all the date formats that are valid in JS. Let's see the below date formats in JS. var d = new Date("2015-03-25"); var d = new Date("2015-...

Shortest way to find the max element of a array

Hello Reader's if you want to get the shortest way to get the max value of the given array, Then by using JS you do it fast. To find the result you have to use Math.max() function. Lets's see the working example as given below:- <!DOCTY...

How to make calculation in Javascript

Hello Reader's If you want to make the mathematic calculations inside the html document, Then by using the JS you can make calculations. You just have to use the document.write() function. Lets see it working in the example as below:- ...

How to change the data inside the div dynamicaly via Javascript

Hello Reader's if you are developing the website that convert the real time data into the div, Then by using Javascript you can do it. Let's see the example as below:- <!DOCTYPE html> <html> <head> <script> functio...

How to show current timestamp by single click on page using Javascript

Hello Reader's if you want to show the current timestamp on the web page by just a single click, Then by using JS you can do it. Lets see the example below:- <!DOCTYPE html> <html> <body> <h1>My First JavaScript...

Arrays and Objects in Javascript

variables are good and sufficient to hold the single values, But what if we want to store multiple values in a single variable in that case you have to use arrays or objects Values in arrays are saved index base. Remember that arrays i...

How to find count and last element of array using Javascript

Hello Reader's If you are working on Javascript and want to get the count of array then you can use the syntax as below:- var car = ["mode1", "model2", "model4", "model5"]; car.length; output: 4 And if you want to get last elemen...

How to print dates monthly between two given dates

Hello Reader's if you want to make ajax html form that takes two dates from user and print then daily or yearly or monthly then you can my code as below:- Lets say the html form, the code will go like this. <div class="form-group clearf...

AngularJS Factory

Hi All, In this we will discuss about factories in Angular JS, as Factory and Services plays an important role in Angular jS application as they allows us to put reusable code at a single place that can later on used in many other places like ...

async attribute is javascript

Hi All, In this blog we will discuss about the async attribute is javascript, which is a boolean type of attribute that's either can be true or false and when ever we use this attribute to any script tag, it simply denotes that the available s...

how to show multiple location from database using lat and long in google map?

Hello Reader's , Below is the code for showing multiple location . Just create a HTML file 'index.html' and put the below code inside the body tag. <script src="http://maps.googleapis.com/maps/api/js?sensor=false" type="text/javascrip...

Slidebar Menu plugin in Jquery

We can create a slidebar menu using jquery slidebar plugin. It is a jQuery plugin that gives a slidebar menu for easily implementing in the web pages. We have to include slidebars.js in our source files. Here is an example that shows how to...

QueryString Value in Javascript

Hi All, Here is quick way to get query string value in javascript: function getParameterByName(name) { name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]"); var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"), ...

How to set values of select box dynamically using Jquery

Hello Reader's if your building the html 5 based web form and want to set the value of select box via Jquery then you can learn it from code as below:- First you need to set the value from html page <input type = "text" id = "txtEmail" v...

Show dates between two dates using Javascript

Hello Reader's if you need to list out the dates between two given dates then you can use the JS code as written below:- Date.prototype.addDays = function(days) { var dat = new Date(this.valueOf()) dat.setDate(dat.getDate() + days); ...

jQuery :not() selector

JQuerys :not() selector is used to filter in some cases when we have some selectors. It selects all the elements except the elements that matches the selector. for example, If we have some checkboxes. When we select any checkbox the backgroun...

Use of Migration library in JQuery

Migrate Library in JQuery While using Jquery you have seen the error $.browser error. This error comes often when we try to use a legacy jquery function in new version of jquery file. The latest version does not support the ol...

Ajax request in YUI

Here is the simple example of YUI ajax with Post and Get method: POST request: var callback = { success: function(o){ alert(o.responseText); }, fa...

IndexedDB

The indexeddb is used to store the data in the browser. It is not a relational database and stores values in the form of key-pair. There are different methods used for performing different actions for a database like add(), get(), remove(). ...

Mobile Number Format in Javascript

Hi All, We in very common scenario come across a scenario where we want user to just be able to enter Mobile Number Format. This small code piece will help in validating user to enter only Mobile number format. $(".Mobilenumbers").keypress...

custom side bar with the help of jquery

Hello Readers In this article I will guide you how to create custom side bar with the help of jquery. Here is the HTML <section id="slideBox" class="open"> <nav id="menu"> <ul> ...

'return false' vs 'e.preventDefault()' In jQuery

When we use jQuery event handler, adding return false works same as adding both e.preventDefault and e.stopPropagation on the jQuery.Event object. e.preventDefault() will stop the event to occur and return false also prevents that event from p...

Web Storage in HTML5

There are two storage session storage and local storage in the new web storage API in html5. HTML local storage contains two objects for storing data on the browser: window.localStorage - stores data with no expiration date window.session...

Sessions in Javascript

Hi All, SessionStorage is something we can use to store values in session in Javascript. Below I will demonstrate how we can use it in our project. To set Session Value: var valueKey = "Value"; function setSession(value) { ...

JavaScript encodeURIComponent() Function

The URI component encoding is yield by the function called encodeURIComponent(). This function encodes special characters like this: , / ? : @ & = + $ #. We can use the decodeURIComponent() function to decode an encoded URI component. Sy...

Determine Height & Width of browser window in JavaScript

Hi All, We most of the time in web development get stuck with responsive designs, the best way to handle that now a days is to use Bootstrap classes which take cares of your site but that helps you to achieve responsiveness width wise. What...

Validations in .NET

In .NET we do validations to restrict wrong entries and making valid values to be entered through the forms. Validation on a form or UI page can be done on two sides 1 Server Side Validation 2 Client Side Validation Server Side vali...

What is a Web Worker?

Hi all, Below is a short description of web workers. What is a Web Worker? Web worker is JavaScript which runs in backside without affecting the performance of site and it is independent of other the scripts,. what web worker are f...

How to make validation for date and time using Javascript

Hello Reader's! if you want to make the Date time format validation in your form then you can use Javascript to validate. Let's see the example below:- your html will be go like this:- <form method="POST" action="/javascript/validate-...

setInterval() method in JavaScript

In javascript sometime you have to perform task repeatedly, in that case setInterval() method can be handy to use. Syntax:- setInterval(function,time_in_milliseconds,param); setInterval accept time in millisecond, let try an example:...

How to check/uncheck a checkbox input or radio button?

First of all check if the checkbox is already checked or not. jQuery('#my-checkbox').is(':checked'); If it is not checked then do it checked. jQuery('#my-checkbox').attr('checked','checked'); And if it is already checked then make...

How to use HTML5 Local Storage

HTML5 Local Storage(Web Storage) mechanisms provides you the facility to store data much more easy way than cookies. Local storage save the data more secure then cookies, where cookie only can store data up to 5mb, local storage capacity is far l...

Upload File using Aajx

Sometime you need to upload the image without refreshing the page , in that case you can upload the image with the help of ajx using FormData Objects . To achieve this lets create a form in HTML to upload the file. <div class="control...

Javascript:Prompt Dialog Box

Prompt dialog Box is used to have an input from the users or to get confirmation on any input. This dialog box is displayed using a method called prompt() which takes two parameters:- (i) A label which you want to display in the text box. ...

Javascript:Confirmation Dialog Box

Confirmation dialog Box is used to get confirmation on any input. It is mostly used to take user's opinion on any option. It displays a dialog box with two buttons: Cancel and OK. If the user clicks on the Cancel button, then confirm() returns...

How to create an alert dialog box in javascript

An alert is a type of dialog box supported in javascript and is mostly used to give a warning message to the users. For example: If one input field requires to enter some text but the user does not provide any input, then as a part of v...

How to create a responsive menu button

hii. i am providing html,css and jquery code for creating a responsive menu button. 1.Here's the HTML code: <body> <nav class="topnavfirst"> <ul class="clr"> <li> ...

Displaying Map using HTML5

Html5 provides geolocation API by using which we can display the results in a Map. Following example shows how we can show the Map in html5. To display the result in a map, you need access to a map service, like Google Maps. <!DOCTYPE html&...

Javascript Carousel

Javascript Carousel In javascript you can create a slideshow with the help of carousel.So multiple slides can be created making our presentation more attractive and user-friendly. <div id="carousel-example-generic" class="carousel sli...

Javascript toggle

Javascript toggle In javascript you can create toggle behaviour wit the help of flexible plugin that utilizes a handful of classes. The class collapse hides the content,class collapsing is applied during transitions and class collapse.in show...

How to use Array sort() Method in JavaScript ?

sort() method is used for sorting the items of an array.It sorts the values as strings in alphabetical and ascending order. And sort() method sort alphabetic or numeric. you can take reference of bellow example. <!DOCTYPE html> &l...

How to add and remove a class on click event

hii, Today i am sharing a blog on How to add and remove a class on click event in javascript. First of all you need to either download few plugins or just copy and paste the below link inside head tag. <script src="https://ajax.google...

HTML5 Web Worker

A web worker is basically a javascript code that runs in the background. It does not effect the performance of the Page. Usually When we run some script in our html page the page do not response until the script finishes. By using Web Workers ...

How to show ads in your website using Google ad sense

Hello readers , Following are the steps to guide how you can show ads in your site. Step 1 First sign in with google ad sense account using below link https://www.google.com/adsense/start/ Step 2 After sign in with your googl...

How to get the last url using Javascript

Hello Reader's! If you are stuck in a condition where you need to redirect old url. Then the quickest way to get previous url is by Javascript. By using the document.referrer function. Let's see the example below:- <script> var oldU...

How to change page background on the day time basis using Javascript

Hello Reader's! If you want to change your web background image automatic on the day time basis, i.e. for day it will show pic 1 and in night it will show pic 2 as background. Lets see the full example below:- </bo...

how to remove duplicate key values from an array using Javascript

Hello Reader's, If you have an array having the multiple duplicate key values then by using Javascript you can make them skip. Let's see the example below:- Lets say an array full of duplicate data. var axes2=[1,4,5,2,3,1,2,3,4,5,1,...

How show image on click event using Javascript

Hello Reader's If you want to show image on a click event. Then using javascript you can use this in real time. Let's see the example below:- <button onclick="add_google_logo();">Add Google Logo</button> Now the JS will go li...

How to print current date in html div using Javascript

Hello Reader's If you want to show current date in a html div, Then you can genrate it in JS then show back to html. Here is the example below:- <div id="Console"></div> Now the script will go like this:- window.onload = fu...

How to highlight a div using Javascript

Hello Reader's! If you want to make a html page that based on user activity, As user clicks on div then JS will make that div highlight. Let's say our div is - <div tabindex="0">Hello World</div> Here div with tabindex of...
1 7 11
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: