Browsed by
Category: Javascript

Difference between Client side scripting and Server side scripting

Difference between Client side scripting and Server side scripting

Difference between Client side scripting and Server side scripting Client side scripting: It runs/interprets/executes the scripts in end-users browsers. Script source code transfered to browser and run and render the output. Browser can be enabled to stop the scripting execution in their end. Slow, as it runs on end-user/client side. Source code can be viewed. Eg: Javascript, AngularJS   Server side scripting: It runs/interprets/executes scripts in web server itself. Everything done in server only the final html output will be…

Read More Read More

381 total views, no views today

Difference between Javascript and Typescript

Difference between Javascript and Typescript

Difference between Javascript and Typescript: Javascript Typescript var myVar = ‘hello’; myVar = 10; console.log(myVar); // prints 10 let myVar = ‘hello’; myVar = 10; console.log(myVar) // we get the error here stating //Type ‘number’ is not assignable to type ‘string’ We dont have a type number only in javascript. Typescript does not have float/double types, everything is considered as type number only (like 10, 11.2, 27.8000). As types are not supported in javascript, explicit assignments will also be not…

Read More Read More

761 total views, no views today

Typescript Quick Notes for Angular Developers

Typescript Quick Notes for Angular Developers

Typescript Quick Notes for Angular Developers: As because of angular’s reach angular developers are forced to learn typescript. It is not tough but it is better to know the below basic syntax to code faster.   1. Converting array to JSON in typescript   selectedItems = []; JSON.stringify(this.selectedItems);       2. For loop in typescript   for(let item of items){ console.log(item.itemName) }   items is an array/collection of item.     3. String concatenation in typescript   appendTxtTemp:string =…

Read More Read More

790 total views, 1 views today

How to install node js in windows 10 ?

How to install node js in windows 10 ?

How to install node js in windows 10 ?   If you want to install NodeJS in Windows 7 then refer the below post: 3 Simple Steps to install NodeJS in Windows 7   Step 1: Download the nodejs package from the below link: NodeJS Package Download (you can download -> Windows Binary (.zip) 32bit / 64bit based on your OS version).   Step 2: Extract the zip file and keep it where you want I extracted and placed inside C: drive…

Read More Read More

2,196 total views, 1 views today

18 Important Javascript Interview Questions

18 Important Javascript Interview Questions

Javascript Interview Questions:     1. Difference between == and === ? == compares only the value. === compares the value along the data type or type of the variable. Eg: 1 == “1” => true;because both has the value 1. 1 === “1” => false;because one is integer and other one is string. So even though it has the same value, because of different data types it returns false. Note: === can be used to compare with null/undefined.   2.Difference between…

Read More Read More

675 total views, 2 views today

Auto populate one dropdown based on other dropdown value change in Angular JS

Auto populate one dropdown based on other dropdown value change in Angular JS

Auto populate one dropdown value based on other dropdown value change in Angular JS:   As we know Angular JS is a two way data binding, mapping the $scope variable in the html/view file will map and bind the updated value which we are assigning/updating in the controller.   I recommend you to study Angular JS Hello world for dummies post if you do not have much idea about angular JS.   Requirements: We need jquery.min.js & angular.min.js to work…

Read More Read More

1,404 total views, no views today

AngularJS Hello world for Dummies

AngularJS Hello world for Dummies

AngularJS Hello world for Dummies: AngularJS is an open source Model-View-Controller [MVC] Javascript framework initially created by Misko Hevery and Adam Abrons in 2009. Now google maintains this web application open source framework. AngularJS written using Javascript language. AngularJS extends HTML attributes by directives.   What is AngularJS? It is a javascript framework mainly used to create single page applications(SPA’s) by extending new HTML attributes. Attributes can be added using directives. Data binding can be done using expressions. AngularJS Basics: Directives…

Read More Read More

804 total views, 3 views today

Developing Gmail Inbox extensions using inboxSDK

Developing Gmail Inbox extensions using inboxSDK

Developing Gmail Inbox extensions using inboxSDK: InboxSDK: What is InboxSDK ? InboxSDK is a platform to develop extensions/plugins for gmail inbox. It’s just a single JS file which you can download from InboxSDK.     Extension in Gmail ? Where can I find it? Yes. It’s a extension in gmail. You can find in sidebars, new compose messages/reply messages etc., New message widget:       How to develop a hello world extension using inbox SDK for gmail ? Requirements:…

Read More Read More

1,900 total views, no views today

Prompt before closing the browser tab example

Prompt before closing the browser tab example

Prompt before closing the browser tab: In realtime web applications like shopping websites and multi tab registration websites we wanted to show the confirmation prompt before closing the browser tab. Because user would have clicked the close button by mistake/without knowing. If we close the tabs without letting him, then he may lost the data’s which he entered.   For example in shopping websites  if user is in payment page and he closed the tab without knowledge/by mistake then he…

Read More Read More

644 total views, no views today

Click to copy to clipboard jQuery

Click to copy to clipboard jQuery

Click to copy to clipboard jQuery:     If you look at the coupon websites, they will copy the coupon you clicked to your clipboard.       Plugins Required for click to copy to clipboard: 1. jQuery Plugin [jquery.min.js] 2. zClip Plugin [jquery.zclip.js]   Click to Copy to clipboard jQuery source code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Click To Copy | Javadomain.in</title> <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script> <script type="text/javascript" src="http://www.steamdev.com/zclip/js/jquery.zclip.js"></script> <style type="text/css"> #javadomain…

Read More Read More

1,229 total views, no views today