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

Featured

Socket.io event handlers.

Hello Readers! If you are creating any real time web application then node.js with socket.io is very worth for it. It connects client to server very easily with no time. Perfect example of node.js and socket.io is a Chat application or online ...

How to save my Offline Data in web applications

Since introduction of Offline storage in HTML5 many new trends have been started by storing persistent data locally on users system for future use. This leverages browsers and users system's capability to store data locally for offline usage. ...

Difference between addEventListener and onclick

Both onclick and addEventListener javascript function will work but sometimes it creates problem for developers to understand what the exact difference of these two's are. var h = document.getElementById('a'); h.onclick = function1; h.onclic...

How to trigger an event using Javascript "addEventListener()" method.

Hello Readers, Their are many ways in javascript and jquery where we can trigger an event using Id or Class. Here's the example of how we can trigger the event using "addEventListener()" method. Let's suppose we have have button having id="...

10 Javascript features you would love to know

Every language has some features which are known to or are used by less number of people but that does not mean they are not of any use. They can come handy in certain situations. Below is a list of some such features of the most widely used lang...

How to get selected drop box text

Normally when we select a value from drop bax then we get the value of option. Here when we will select a value of option then we will getting text of option. SO to get selected drop box text use below code example- Javascript function get...

Disable slider from ratchet

If u are using ratchet.js to slider many images and you want to destroy browser method when we drag/touch page to left .It will turn to next tab . If you want to click an element button than trigger the 'slider' method.. so it is best if you u...

How to get HTML structure using document.getElementById

Hello Readers! In almost every web application their will be a need of javascript function "document.getElementById" , lets understand this how it work. Say suppose We have this HTML structure <div id="scores" style="display:none;">...

How to iterate Object List in JavaScript

Sometimes we need to send data from Controller to JSp. Here I'm going to explain how we can send and iterate Object List in JSP file. You can do this easily by following the below steps: 1- Define the below dependency in you pom.xml file for...

Cross site scripting XSS attacks

XSS is cross-site scripting, with this an attacker can insert malicious script/html into the victim's browser. The end users browser has no way to know whether he script is trusted. It assumes the script came from the trusted source. The malic...

Swapping Z-Indexes of Entities in Impact JS

Impact JS keeps all entities in an array in the order of their creation. The main problem is that it is also the order of their z indexes. So the entity at the last index of array is at the top of every other entity. But in our games we get some ...

Using Local Storage In HTML5 - Capable Browsers

What is Local Storage in HTML5 ? The Local Storage is a client side web storage database which is used to store the data in the form of key/value pairs. Using Local Storage, we can store the data of at least 5MB. It provides javascript bas...

How to call a function from string in Javascript

Hi, Generally, there are two methods to call a function from a string. Using eval. Using window object. First solution is using **eval**. It is easy to use but generally real programmers avoid to use this. Example 1 without arg...

How to display location on Google Map in JSP in JAVA?

Sometimes we need to display Google Map on a JSP page, for this you just need pass lat/long to JSP. Use below code to initialize map in script: var marker = null; var map = null; var markers = []; function initial...

How to Create and Retrieve Array in Javascript?

If you want to store multiple values in a single variable javaScript arrays are used. There are few ways to store values in array in javascript which are mentioned below. First way: HTML: <div id="fruitList"></div> Javasc...

How to make simple calculator with the help of Angulor JS

This Script will helpful to make a simple 'addition' 'subtraction' 'multiplication' 'division' calculator with the help of Angular JS. <!DOCTYPE html > <html> <head> <title>Angulor Calculator</title> &...

How to convert number into corresponding Month Name

Hello Everyone, In this article I am sharing how to display Month Name for corresponding number such as if we have month coming in number from server say(1,2...so on) and we want to display January in place of 1, February in place of 2 and so on ...

How to add list dynamically

This is very simple way to add list dynamically using jquery. In this first you have to give Id to select tag then add the script. <html> <select id="memoryCategories"> <option>Categories</option> </select&...

How To show Rating (Angular.js)

How to show Rating Dynamically If you want to show rating dynamically you can follow the code below. Here phone.rating contains rating and it comes dynamically. <html> <div class="rating-block clearfix" funboard-rating rating-va...

Creating CSV from HTML using jQuery

In one of the project, I needed to create the CSV file from the html using jQuery. To make this possible, I created the below code to convert the html into csv file using jQuery. <script type="text/javascript" src="jquery.min.js"><...

How to export data to csv using javascript and jquery

Sometimes you face the problem to export the data into csv file using clientside platform. In this case you can use javascript and jquery. Below is the code to find out the solution: Javascript Code: $(document).ready(function () { ...

Form submit in javascript

I would like to share an interesting feature that I found as I was trying to submit form through JavaScript. If you are trying to "form.submit()" through javascript and any form elements present with the name of "submit" in it, then in that case...

Upload image through AJAX form in PHP

You can easily upload an image through form in PHP. You need to add JavaScript file for send image data on server side through AJAX. Please add query.form.js in your code. You may download this js file form following link: https:...

How to install meteor on windows

Meteor is a new javascript framework which is designed to simply the web development and automate the process. The best feature of meteor is real time communication. It acts in real time. Installation of Meteor on Windows: Download nod...

How To Create A Simple Animation With The Help Of Jquery

Simple Animations With The Help Of Jquery You can slide elements or any content of HTML and even stop animations in mid-sequence. To slide elements up or down. $("#Element").slideDown("fast", function() { // For slide down ...

What Are The Use Of after() and before() Methods In JQuery

**Use Of after() and before() Methods In JQuery** The jQuery after() method inserts content AFTER the selected HTML elements. And The jQuery before() method inserts content BEFORE the selected HTML elements. **Example** $("p").after("S...

Scroll down to selected item in gridview using javascript

The blog is related to move the position of scroll according to the selected item using javascript:- Consider the following example:- Let's say you have a gridview control and a dropdown above that. If you select any item from dropdown the grid...

Get current geo location from browser using html5

We can get our current geo location (latitude and Longitude.) from desktop browsers as well using html5 geolocation. We just needs to add script into our html page and it will ask you to share your location. After approve it will return you your ...

A Very Simple & Easy Javascript Form Validation

Here is a simple way to validate user name and password in an HTML form using java script. <html> <head> <title> Login page </title> </head> <body> <h1 style="font-family:Arial;text-align="center"...

Check file-size using jQuery without uploading file

A simple code snippet for checking the file-size of a file before uploading it. It will not only help to save time but also network resource as we can implement the file check at the initial point only. The current code allows the user to sel...

Making Custom Select Box Using JQuery

While designing an HTML form, a lot of time there is a requirement of custom form elements. Below is a tutorial on how to create some nice custom select box with CSS and jQuery. <div class="selectBox"> <div c...

Changing the Behavior of a Dialog Box with Effects

The options used when creating the dialog box can be modified by the dialog ("option", param, value) method. The param parameter is the name of the option, while the value corresponds to its new value. lets change the effect for the opening and ...

Changing row color on clicking radio button

Consider an HTML table with multiple rows having radio button in first column of each row. Now, if we want to change the row color when radio button associated with it is clicked, we have to write following code. // HTML // Untitled ...

Finding the Dimensions of an Element

You want to determine the space occupied by an element. The width and height methods can be applied to any element, and they are useful for determining the computed width or height of an element. However, they fall short if you need to deter...

Finding the Dimensions of the Window and Document

You want to get the width and height of the window and document in pixels. jQuerys width and height methods provide easy access to the basic dimensions of the window or document: $(function() { alert('Window height:'+jQuery(window).height(...

Web RTC : Strongest Api of HTML5 Part -ii

holla amigos In my last blog i shared the power of web rtc and the first api getUserMedia of the web Rtc . This article will be focus on the Peer to Peer connection of the Web Rtc. Let me explain you first what is Peer-to-Peer connection ex...

Subtract date in JS

Subtract date in javascript : - var current = new Date(); //It will give the current date and time in default format. var future_date = new Date(now .setHours(now .getHours()+48)); //in this we add 48 hours in present time . ...

Adding and Removing Select Options

A drop-down box for colors and want to add new colors to it, as well as remove options from it. <label for="colors">Colors</label> <select id="colors" multiple="multiple"> <option>Black</options> <option>...

Adding data to jqxtree dynimacally on click of nodes of a tree using AJAX call

There might be a case where user wants to add data to jqxtree on click of each individual node. Below is the code which help us to achieve the above functionality where user can get data from JSON file or database on click of each individual tre...

Formatting jQuery date picker

Sometime you may need to use the jQuery calender in some project. you writes the following code: jQuery( ".in_time" ).datepicker(); and it gives you: 1- if you need to show all the dates which are previous to the current date: If ...

Declaring variables in jquery / javascript (for ie8)

Sometime we need to perform some operations in variables values in jquery or javascript. We generally uses: a = jQuery('input#marks').val(); It will be working fine in all the browsers except ie8. This type of assignment doesn't works i...

Restricting the textbox to enter number only using thier ASCII codes

We can disable the keys to enter inside the textbox. For example if we have a textbox for entering user's age then a user only need to enter numbers (The age will only be in number format ie 12,18 and so on) We can use the following javascript...

JScript to Check or Uncheck Checkbox in a Grid

JScript to Check or Uncheck Checkbox in a Grid Inputs: GridObject: Object of the grid in which checkbox exists Column: Column name where value is searched CellValue: Reference cell value Status: Check or uncheck the checkbox funct...

Selecting a text field with name using JQuery

JQuery has loads of selectors that can be used to select an HTML Element from a page. One of the common scenario with development for even a simple case of validation requires to check for input fields and to do so we can use a selector that s...
1 9 11 next
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: