Quantcast
Channel: threshold » JavaScript
Browsing all 10 articles
Browse latest View live

JavaScript – Ternary Operator

Following is syntax of ternary operator in JavaScript. test?expression1:expression2 Example: <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Ternary Operator</title>...

View Article



Image may be NSFW.
Clik here to view.

JavaScript – Strict mode

Strict mode is new feature in ECMA Script 5. This mode allows you to run program, piece of program (context) in strict mode. This mode will help your code by throwing error if your program violets...

View Article

Image may be NSFW.
Clik here to view.

Fixed width, centered design in SharePoint site using css

By default SharePoint gives 100% width to sites created. We can fixed width of site by using custom css and changing some class names in master page. Lets have look to the solution. div.s4-title.s4-lp,...

View Article

Making Field Read only in SharePoint 2010

Many times you need to disable the fields in SharePoint form for ‘New Item’. By using JavaScript we can disable field in easier way. Lets discuss an example. Using JavaScript Find field id by...

View Article

Check internet connection using JavaScript

Sometimes you need to check device have internet connection or not. This can be done by simple JavaScript function var connectionMessage = "Your device have internet connection."; var...

View Article


Image may be NSFW.
Clik here to view.

Call function of the parent window from iframe window from JavaScript

You can call code of the parent window form child window. f you open window by using iframe, you can communicate from child window with the parent. Let’s see an example Page1.html (Parent window)...

View Article

Image may be NSFW.
Clik here to view.

Convert Text to Image using canvas

With using canvas we can export image with dynamic text. Let see example below. HTML code <h2>Text</h2> <div id="contentToWrite1" style="border: solid 1px gray; padding: 5px;"> first...

View Article

Image may be NSFW.
Clik here to view.

Metro style context menu using JavaScript and CSS

What is context menu? When you right click on browser window, browser will show you a menu containing some common functions. See following image for reference. If you want to build your own custom...

View Article


jQuery Mobile Introduction

Touch-Optimized Web Framework for Smartphones & Tablets Recently I worked on mobile application based on HTML5 and JQuery. I have used jQuery mobile framework. It is very simple to learn and use,...

View Article


Image may be NSFW.
Clik here to view.

HTML5 web storage – offline storage solution for the web

Using HTML5 you can store data into user’s browser. Before HTML5, there was only one way to store data using cookies. This web storage stores data in key/value pair. You can use this technique to store...

View Article
Browsing all 10 articles
Browse latest View live




Latest Images