Refinance now before rates go up! Get multiple rate quotes at GetMyLender.com.
Showing posts with label JavaScript. Show all posts
Showing posts with label JavaScript. Show all posts

Minify CSS and JS file using Visual Studio 2012

Before going on our main topic we have to discuss about one of the Dot Net feature i.e. Microsoft’s Web Optimization Framework. So, what is Web Optimization Framework and how to use this framework in Asp.net web form application? Microsoft’s (ASP.NET) Web Optimization Framework introduces a way to bundle and optimize CSS and JavaScript files.

If anyone wants to install Microsoft ASP.NET Web Optimization Framework, run the following command in the Package Manager Console of Visual Studio 2012.

Difference between GET and POST Methods

In this article, we will discuss about difference between GET and POST Methods. So that it will usefull in your apllications.

GET Method ():

1) Data is appended to the URL.
2) Data is not secret.
3) It is a single call system.
4) Maximum data that can be sent is 256.

How To Create Best Tooltip Only Using HTML & CSS

Tooltip is used to describe information about anything which may on HTML pages. It is possible to create tooltip to show information about fields so that user will not be confused about what and how to enter correct data in fields.

Here is the general code to create tooltip design.

Remove or Replace Line Breaks using JavaScript

In web applications, whenever we add any textarea tag on the form to get some text from user. In textarea, user can write on new lines but while accessing that text if we don’t want such line breaks. Hence in this post, we will see how to remove line breaks from regular text using some simple javascript code.

Many times we simply think ki it is just a simple line break we don’t need to take care so much. But Line breaks in text are generally represented in three ways according to types of operating system.

Difference between Library and Framework

A Library and a Framework are a set of classes, modules and/or code (depending on the programming language) that can be used in your applications.

Suppose you have to maintain log or debugging info in your applications, draw charts, create an specific file formats like .html, .pdf, .xls, connect to a data base, create applications using Design Patterns or simply create some/complete application etc.

These types of problems can be solved using Framework or a Library.

What is the Use of "Use Strict" in JavaScript?

"use strict";

It is an literal expression. The purpose of "use strict" is to indicate that the JavaScript code should be executed in "strict mode".

With strict mode, you cannot use undeclared variables.

i.e. Compiling a numeric literal (2 + 5;) or a string literal ("Arun Kumar";) in a JavaScript program has no side effects. It simply compiles to a non existing variable and dies.

Dynamically Create and Download HTML or Text File using JavaScript

Sometimes we need to create html/text file using content from text box and download that file using JavaScript. This post explains one of the best solutions on that using HTML5.

Following code will not used for IE as we are using download attribute of anchor tag which is not supported in IE browsers. This code will be useful to work on Google Chrome, Mozilla Firefox, Safari.

Here is the code with line by line full description of each line of code.

AngularJS : Difference between Factory and Service

The main purpose of AngularJS service / factory function is to generate a single object or function that represents the service to rest of the application. That object or function is passed as a parameter to any other factory function which specifies a dependency on this service.

AngularJS : Change Title of Page According to Route

AngularJS is used to build single page web applications. So even if you change route i.e. route from one template to another, you would see the same title for all templates on the Browser.

In normal condition, route changes from a server, so page title set automatically to the title of head tag. Client-side routing doesn’t have that automatic mechanism.

What is the Document Object Model?

The Document Object Model (DOM) is an Application Programming Interface (API) that gives programmers and developers a way of accessing and manipulating the elements within HTML and XML documents.

With the Document Object Model, programmers can create and build documents, navigate their structure and perform various manipulation operations such that add, modify or delete elements and content. Anything found in an HTML or XML document can be accessed, changed, deleted or added using the Document Object Model. In simple sentence "The way that document content is accessed and modified is called the Document Object Model or DOM".

Installation of npm and Introduction to Browserify

Browserify is a development tool that use node.js-style modules means CommonJS module system for frontend JavaScript development. We write our modules in separate files, exporting external methods and properties using the module.exports and exportsvariables. We can even require other modules using the require function.

If we omit the relative path it'll resolve to the module in the node_modules directory.

Getting started with the browserify command-line tool requires node.js and npm (Node Package Manager) installed.

How to Prevent Default Behavior of Anchor Tag using JavaScript and jQuery

Many times we need to use anchor tag in html coding. For anchor tag we assign href attribute with URL. So that whenever user click on that it will redirect to URL given as a value of href attribute. But how to prevent this default functionality?

We can prevent this default behavior of anchor tag using JavaScript or jQuery.

Simply, if we assign # to the href then after clicking on it will not redirect to any URL but it will jump to top of screen.

<a href="#"> Click Here </a>

Get Current URL at Client Side Using JavaScript and jQuery

Sometimes it is necessary to know current URL, so that we will perform different operations on that or use that URL for various purposes. In this post, you will learn to get current URL from browser at client side using JavaScript and jQuery.


Using JavaScript

The window.location read-only property returns a Location object with information about the current location of the document.

AngularJS : Basic Information

The basic information of AngularJS is given in the form of Questions and their respective Answers are as follows:

1) Why this project is called "AngularJS"?
Answer : You know the basic information of Hyper Text Markup Language (HTML). HTML tags always have an Angular brackets like < > and pronunciation of these brackets is Angular. In AngularJS, code of view is written using HTML tag or using custom tag within Angular Brackets. Hence name is Angular. All the code written for Angular is a code of JavaScript (JS). Hence the complete name given to this project is "AngularJS".

Instructions For Adding Chitika Ad Code To Site Hosted On Blogger

Here are simple step-by-step instructions for adding your Chitika ad code to your site hosted on Blogger.



1. Log into your Blogger account.

2. Once logged in you will need to click on "Layout"

AngularJS : Prerequisites, Libraries And Frameworks, Goals And Advantages

Prerequisite For Learning AngularJS ?

For learning AngularJS, it is sufficient to know only some basic

• knowledge of HTML, CSS, JavaScript, including the following concepts:
• The POJO (plain old JavaScript object)
OOP, including encapsulation and inheritance
Object creation, prototypes

AngularJS : Model-View-Controller Architecture And Different Ways of Writing Code

What is Model-View-Controller (MVC) Architecture ?

Model-View-Controller (MVC) is one of the software architectural pattern for implementing user interfaces (UI). This architecture divides a software application into three interconnected parts as given in its name i.e. Model, View and Controller. It separate internal representation of information from the ways that information is shown to or accepted from the user.

Model : Model is the data shown to the user in the view and with which the user interacts. Data can be of two types :

AngularJS : Introduction, History, Single Page Application


AngularJS Intoduction :

AngularJS is an open-source web application framework, maintained by Google and community that assist with creating Single Page Applications. The main goal behind AngularJS is web applications with Model–View–Controller (MVC) capability, in an effort to make both development and testing easier. It can be used to build dynamic as well as client-centric web applications.

Iphone's Iframe Height = 100% Then After Refreshing Page Iframe Height Increases Automatically

Many of us solving issues related iphones, This is one of the issue that found in my practises. I want to show iframe on a page using following coding, it obiviously work on all browsers and mobiles except iphone browsers. It is very good stuff from I am wondering in my practises.

Issue : On Iphone, after refreshing page I have reproduced this issue. Height of an iframe increases automatically after every refreshment of page.

It will be solved in some cases after removing style of height of div id="mainDvContainer" from test.html, but in some cases you may loss your original design.

Iphone Shows Same Height And Width Of Window Screen Even After Changing Orientation

In this post, we will see one of the secret of Iphone i.e. Iphone shows same height and width of window screen even after changing orientation but this is not happened in Android. So be carefull while coding for window screen height and width in javascript for Iphone and Android devices.

IPhone shows same height and width for window.screen.height and window.screen.width respectively even after changing orientation. Means if you are changing orientation from Portrait to Landscape or Landscpae to Portrait and checking screen height and width, you will get same height and width in both the modes.

Many of us working on iphones for making and designing applications.
Before moving on your logic part for developing applications on such devices using screen height/width, first of all you have to check whether device is workable for that logic or not.