Featured
-
Top 10 Template Engines for JavaScript
What is a Template engine? Template Engines are
by nishant.mishra -
jQuery Accordion
Hello readers! In this Blog we will gain knowled
by vishwanath.rana -
How to make Numbered and bulleted list in HTML Editor with JavaScript
Hello all, Working with HTML Editor we wanted t
by gaurav.gautam -
How to hide particular div with just one click?
Hi, you want a condition in which the particula
by abhishek.tiwari.458 -
How to Create and Retrieve Array in Javascript?
If you want to store multiple values in a single v
by siddharth.shahi
Tags
How to Find Value inside Table Row using JavaScript
If you have large amout of data in your table and its contain hundreds or thousands of rows and columns. One cannot expect users to keep scrolling vertically/horizontally for finding information of their interest.
My blog show you an easiest w...
Objects in javascripts
Lets understand "Objects" in javascript.
Object: It is a collection of property and each property is associated with name value pair. The object can contain any data type.
Lets understand this with the help of an example:
var demoObj = {...
How can I do change background color of an Chekbox using css?
Hello readers...
I face a problem in changing the background color of a check-box. Please help me out from this problem.
By using background property it takes its default value as you have seen the color and text of a check- box will change to ...
How to change data on changing the option box
Hello Reader's if you are looing to develop the html form which changes the data on changing the values in option box, then in this blog you can see how it is done.
To making this form we will start from html file. And its code will go like this...
Events In Javascript
We can handle interaction of javascript with html document with the help of events that take place when user perform some task or when browser performs some manipulation on a page.
Below are some example of an events:-
Loading of page
...
Age and Email validation by using javasciprt
Lets see an illustration how we can validate age and email id through javascript
In this example,we are taking inputs from user in age(textbox) and Email (Textbox). By using functions of javascript we can validate both the values.
fu...
Data Types
In javascript,There are variables in which we can store the values. We declare a variable with the var keyword:
var myVariable;
The variables have different data types in javascript.
VariableExplanationExample
StringIt takes "A stri...
Document Object Model in javascript
Document object model in javascript:-
A document object model represents the document in the window that is display at your screen it has various properties that refer to other objects and allow to access and modified content and that way is k...
What are the advantages of using AngularJS over jQuery?
As the various answers here say, Angular is a framework and JQuery is a library
Let say we need to execute the well known scenario of a UI having the capacity to send a few solicitations to a backend server and shows the outcomes on a website...
Using hasOwnProperty() method in "for...in" loop JS
We all know that for...in loop is used to iterate over enumerable properties of object as well as properties of its prototypes, but what if we want to iterate over properties attached to the object itself, and not its prototypes.
this is where...
Javascript Dialog box
Dialog Box: A dialog box is a temporary window used to retrieve user input while creating application. It can be used to raise or alert and to get the confirmation of input from the user
Types of Dialog box:
Alert dialog box
Confirmation...
FORM VALIDATION USING JAVASCRIPT
We can do validation of a form which is created in html by using javascript.
In below example if we do not put any thing in fname field, then validateName function will alert a message that Name field is empty.
eg:-
function validateN...
Purpose of onerror event handler in javascript
In JavaScript onerror is a Document Object Model event handler. It occurs when error occur during object loading. In JavaScript window.onerror is used as an event handler, there is no error event being triggered: Alternatively, when the exceptio...
Minification in Javascript
Minification in Javascript:
Minification means removing/clearing. In javacript, Minification is the process of removing all characters(i.e extra whitespace, comments, new line characters, etc.) from the javascript source code that are not ne...
Exception handling statement in javascript
In JavaScript try/catch/finally are called exception handling statements. In JavaScript try/catch/finally statement manage some or all of the errors that might occur in a block of code. Try/catch/finally in JavaScript lets you deal with exception...
Function parameters in javascript
We know that in JavaScript functions have parameters
function(parameter1, parameter2, parameter3) {
code to be executed
} // here function is the name of the function
Rules for the parameters
We do not specify data types fo...
Arrow functions
Arrow functions are the functions that have a shorter syntax compared to function expressions and arrow function lexically bind the this value. Arrow functions effectively turn function (arguments) { expression } into arguments => expression a...
How to validate email address
It is very important to validate the email while validating an HTML form. An email is taken as a string which is separated into two parts by the @ symbol.
1. user_info
2. a domain
i.e., user_info@domain.
The length of the user_info pa...
How to represent the odd/even rows using alternate colors
We can create odd/even stripes with different alternate colors which is easier to identify and good to represent the data in alternate color format.
We can use the css method to color the even/odd rows using class selectors. This is the case w...
How to use the CSS Selector for dynamically chaging the listing.
Here we will learn how we can use the css selector to change the representation of the
the navigation listing or other listing.In the below example we have listed some of the air sports and water sports and we will change the representation of t...
How to validate coma seperated emails using Javascript
Hello Reader's, If you are developing the form for multiple email address as input, then you need to validate each email individually. You can do it by validating on submit or after submit.
By using the Jquery script you can do it on user end,...
How to check that browser supports File api or not ?
Check browser support for File api : File api is a feature of HTML5. File api is basically for doing some processing on the local files. User can get the files mime type or last modified date etc. User can also achieve the drag and drop file uplo...
LOOPS IN JAVASCRIPT
LOOPS IN JAVASCRIPT
A loop allows us to repeat or execute a set of statement multipel times, which are written inside a loop. It execute a block of code many times. Just like all other programming languages javascript also support looping con...
Object Literals In Javascript
Like in many other programming languages, there are objects in JavaScript.The objects in JavaScript can be compared to object in real life. JavaScript object's is a standalone entity, with its own properties and type . Compare it with a bucket, ...
Conditional Statements in Javascript
Conditional Statements:
Conditional Statements are those statements which run different block of codes according to the condition or we can say these are those statements which perform different actions.
Following conditional statements ar...
How to add the new class in a div dynamically
We can change the text format, style,font size by adding a class created as per the requirement to the div or any html element dynamically using the addClass method of jquery.
For Example: let us change the content inside the div that cont...
jQuery - Removing hover effect in Responsive design
Hii,
As we all know that for mobile and tablet screen hover effect doesn't works so we need to remove all hover effects provided after window screen width 768px.It's very simple using Jquery.Just go through the following steps.
Step 1:Make su...
What is Ext JS
Hi All,
Today we will discuss about one of the very powerful and widely use JavaScript framework Ext JS for building application with interactive design and cross platform compatibility using various techniques like Ajax, Dynamic HTML (DHTML...
How to change the text of an input using jquery
How to change the text of an input using jquery
We can change the text of an input with the help of attributeEquals selector in Jquery
Syntax: $(attribute='value of the attribute')
attribute can be : name , value, title, style, src, id, ...
The valueOf() method of JavaScript Array
JavaScript Array valueOf() method : The valueOf() method returns the copy of itself. This is the default method of an array object.
Syntax of Array valueOf() method :
array.valueOf()
Example of Array valueOf() method : In this example ...
Datatypes in JavaScript
JavaScript consist many type of datatypes, like:
Boolean
Number
String
Array
Object
To know what operation you are going to perform on variables, you need to have the knowledge what is the data types of the variable you are using.
...
Private variables and methods in javascript
Helllo
Today, we will discuss about private instance variables and methods in javascript.
Most of the time it is believed that javascript can not have the information hiding property but that is not true. Javascript objects can have privat...
How to check browser has java enabled ?
Check Java Enable on browser or not : In some web application we need to run Java applets, flash and other softwares and these softwares only runs when Java is enabled on browser. So now the question is how a developer know that browser has Java ...
Exception Handling in Javascript
Exception:
An exception is an error that occurs during runtime of a program. Example can be like we are using a array index that is out of bound of defined array in a program.
Exception Handling:
Exception handling is used to handl...
Javascript predefine functions
Function in programming language can be called anywhere in a program and it can be used again and again in the entire program you have to make a function once and you can call that function whenever you want. The programmer need not write the sa...
Get all the CSS styles associated with an element
Hello
Today we will discuss about the ways in which we can get all the CSS styles associated to an element.
The CSS styles to an element can be applied in two ways:
- using inline styles
e.g.
<div style="border:solid...
The possible reasons for DOM method / jQuery selector not finding the element
Hello
Today, we will discuss the reason why a DOM method/ jQuery selector is unable to find an element.
There could possibily be following reasons for this behavior of the method/selector:
The element with the ID passed does not actua...
Properties of the jquery fineuploader
Hello Guys
Jquery introduce plugin for upload the files from client to server in javascript is known as fineuploader.
FineUploader have many properties to use according requirements.
Here, We have define the fineuploader properties a...
How to replace characters in the current URL using Javascript
How to replace characters in the current URL using Javascript
During development in one of my project, I need to replace an expression in the URL, the code that helped me is as follows:-
The Steps we will follow are:
1. Get the current UR...
What happen when scope is terminated in angular js?
Hello Friends, Some time we get stuck when a scope is terminated and found that two similar destroy events are triggered. Here we want to understand What and why are they two used for in angular js.
The first one is an Angular jS event, $destr...
How to use jQuery clone () Method ?
Hi Reader's,
Welcome to FindNerd, today we are going to discuss how to use jQuery clone () Method ?
The clone () Method is used for making a copy of matched element.This Method makes the
duplicate of the matched elements.
clone () Metho...
Asynchronous file upload using jQuery
Hello
Today we will discuss about Asynchronous file upload with jQuery.
In order to upload the files to server asynchronously you can follow any of the following practices:
use a plugin
without using a plugin
In this post, I w...
How do you reset a $timeout, and disable a $watch().
To cleanup the timeout, just use ".cancel()":
var customTimeout = $timeout(function () {
// your code
}, 55);
$timeout.cancel(customTimeout);
The same applies to $interval().
To disable a watch, just call it.
// .$watch() ret...
Difference between AngularJS Expressions and JavaScript Expressions.
Like JavaScript expressions, AngularJS expressions can contain literals, operators, and variables.
Unlike JavaScript expressions, AngularJS expressions can be written inside HTML.
AngularJS expressions do not support conditionals, loops, an...
splice() method of Array in JavaScript
JavaScript Array splice() method : The splice() method is used to add or remove the element from/to array. Using the parameter we can add or remove element to/from desired position. It changes the original array. The splice() method returns the r...
How to make validation for multiple email validation using Jquery
Hello Reader's if you have implemented multiple input for emails and you want to validate all of them using a single validation rule. By using JQuery you can make this.
Lets see how to make validation:-
Suppose your html page is like this:-
...
How to merge the contents of two or more objects together into the first object using jQuery
Hello friends,
Most of time we need to create Object of contents in jQuery and use it according to requirement , So in this block you will see how to merge two or more object in first object .
When two or more object arguments are supplied t...
JAVASCRIPT OUTPUT DISPLAY FUNCTIONS
In javascript we use different functions to display outputs, like to display into an alert box, HTML output, HTML element,browser console we use different functions.
1. window.alert():- Used when we want to display data into an alert box.
E...
How to create custom directives in angular js?
As we know that there are also some built in directives provided by angular js. Apart from these we can also create our own custom directives by using .directive function.
When we are naming a directive we must ensure that it should be in camel ...
Difference between $state.transitionTo() and $state.go() using angular-ui-router in angular js?
$state.go(to [, toParams] [, options])
It returns Promise which represents the state of transition.
It is the convenience method for transitioning to a new state. $state.go calls $state.transitionTo internally but automatically sets options to ...