Categories
Javascript

Limitations of JavaScript

JavaScript is a lightweight dynamic computer programming language commonly used as a part of web pages, allowing client-side script to interact with the users and create dynamic pages. Here we will learn some limitations of JavaScript. As JavaScript is a client side scripting language but we can not treat JavaScript as a fully programming language. […]

Categories
Javascript

Get URL parameter in javaScript

Using javaScript you can get the URL parameter also. Using Array.prototype.slice.call you will get the all parameters that is append in URL string. Example of URL parameter: var args = Array.prototype.slice.call(arguments); You can get the value using: arg[0], arg[1] etc.

Categories
Json

JSON with Ajax

Ajax is Asynchronous JavaScript and XML for for asynchronous web applications. Using ajax data from a server asynchronously retrieved and display without reloading the page. So JSON with Ajax is no exception. JSON stands for JavaScript Object Notation. So, in simple terms JSON is a way of formatting the data. For, e.g., transmitting it over […]

Categories
Json

Syntax of JSON

Basically Syntax of JSON is the subset of the JavaScript syntax. It has following notation: Data is represented in name/value pairs. The name/value pairs are separated by , (comma). Curly braces hold objects. Square brackets hold arrays. Below is a example of Syntax of JSON: {“students”:[ {“Name”:”Tim”, “Age”:”25″}, {“Name”:”John”, “Age”:”30″}, {“Name”:”Jane”, “Age”:”45″} ]} So,students[0].Name + […]

Categories
Json

What is JSON?

JSON or JavaScript Object Notation is nothing but a text-based human-readable data storing and interchange. Douglas Crockford originally specified the this format.The media for this is application/json and the extension is .json.This is an easier-to-use alternative of XML. The below example shown an student object with an array of 3 records: {“students”:[ {“Name”:”Tim”, “Age”:”25″}, {“Name”:”John”, […]

Categories
AngularJS

AngularJS Tables

In AngularJS Tables we can show repeatable data. Using ng-repeat directive we can draw table easily. See the below example how to use ng-repeat in table. Table data is normally repeatable by default and ng-repeat directive can be used perfectly to create table easily. Example of AngularJS Tables: <table> <tr> <th>Name</th> <th>Age</th> </tr> <tr ng-repeat=”x […]

Categories
jQuery

Avoid jQuery conflicts with other libraries

jQuery uses $ as a alias or shortcut. So if you use another javascript library (like prototype, mootools etc) that uses same alias then you are in a jQuery conflicts situation. Use no-conflict mode to avoid jQuery conflicts: You have to use a new variable name to replace with jQuery $.For e.g. <script src=”jquery.js”></script> <script […]

Categories
Html

HTML Tables

In html there are set of elements that are needed to create tables. Table can be created using <table> element.Each row of a tables are defines via <tr> element and each cell are defines via <td> element within <tr> element. So a basic structure of a table looks like: <table> <tr> <td>Cell</td> <td>Cell</td> </tr> <tr> […]

Categories
AngularJS

AngularJS Forms & Validation

Using AngularJS Forms you can collect number of inputs. Form can also validate input data. For any type of invalid input it can throw error for notify user. But note to remember that this is just a client side validation. You need to validate from server side also. Here is a sample code for AngularJS […]

Categories
AngularJS

AngularJS Views

Using ng-view and ng-template directives and $routeProvider services you can provide single page application via multiple views on a single page. ng-view: A place holder where a corresponding view can be placed.ng-template: Used to create an html view using script tag with the help of “id” attribute.$routeProvider: Set the configuration of urls and map them […]