
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Found 598 Articles for Front End Scripts

191 Views
For timeout callback in Google Chrome, try the following code:_callback = false; function successCallback(position) { _callback = true; console.log('success'); } function errorCallback(error) { _callback = true; alert('error'); } setTimeout(function(){if(!_callback)console.log('ignored')}, 20000); navigator.geolocation.getCurrentPosition( successCallback, errorCallback, {timeout: 2000} );

1K+ Views
To continue loading audio to play while you are navigating through pages, try the following:Use Ajax to load content History API’s pushState() can also be used to alter URL without page reload. History.js should be used for consistent behavior across multiple browsers.The pushState() has three parameters: State object For new entry created by pushState() Title: You can pass a short title URL: New history entry's URL

1K+ Views
To ignore HTML validation, you can remove the attribute on button click using JavaScript.Uer removeAttribute() to remove an attribute from each of the matched elements. First Name: function display(id) { document.getElementById(id).value = document.getElementById(id).removeAttribute('required'); }

355 Views
To move an HTML div in a curved path, use any of the following: CSS Transitions JavaScript (jQuery) HTML5 CanvasTry JavaScript to make it work in every browser.Use the animate() method. The animate() method performs a custom animation of a set of CSS properties.The following is the syntax:selector.animate( params, [duration, easing, callback] );Here is the description of all the parameters used by this methodparams − A map of CSS properties that the animation will move toward.duration − This is an optional parameter representing how long the animation will run.easing − This is an optional parameter representing which easing function to use for the ... Read More

231 Views
Google Analytics is a freemium analytic tool that provides a detailed statistics of the web traffic. It is used by more than 60% of website owners. Analytics Tools offer an insight into the performance of your website, visitors’ behavior, and data flow. These tools are inexpensive and easy to use. Sometimes, they are even free.If the application is offline, Google Analytics stores the events in an SQLite database.After storing, it waits until the user is online again to send them.It is used to collect offline latent hits. The value represents the time delta in milliseconds between when the hit occurs ... Read More

335 Views
To solve this issue for drag and drop event, dragLeave fires before drop sometimes:onDragOver = function(e) { e.stopPropagation() } onDrop = function(e) { /* for drop */ }Under drop, you can set this:function drop(ev) { event.preventDefault(); var data=event.dataTransfer.getData("Text"); event.target.appendChild(document.getElementById(data)); }

188 Views
To place the retina size image into an HTML5 canvas, try the following code with canvas:var context = myCanvas.getContext("2d"); context.attr("width", width * window.devicePixelRatio); context.attr("height", height * window.devicePixelRatio); context.scale(window.devicePixelRatio, window.devicePixelRatio); context.drawImage(img, x, y, width, height);

1K+ Views
HTML5 enabled browsers to have a video element that you can use to play a video on your site. To let you know, flowplayer and other flash based video streaming players use the FLV format. It has the same encoding as H.264. FFMPEG can convert videos to FLV, feel free to work it with flowplayer. Use the flvtool2 for reading and writing FLV metadata from and to the file. Use the tools to create your videos and stream them through flowplayer.

107 Views
In future, in the same like today, if any user still wants to use Flash they will have to enable Flash manually.HTML5 and Flex is the future.HTML5 is a cooperation between the World Wide Web Consortium (W3C) and the Web Hypertext Application Technology Working Group (WHATWG). The latest versions of Apple Safari, Google Chrome, Mozilla Firefox, and Opera all support many HTML5 features and Internet Explorer 11.0 will also support HTML5 functionality.The mobile web browsers that come pre-installed on iPhones, iPads, and Android phones all have excellent support for HTML5. Flexbox (flexible box) is a layout mode of CSS3. Using this mode, ... Read More

315 Views
Storage event handlers only fire if the storage event triggered by another window. You can try to run the following code:// event handler window.addEventListener('storage', storageEventHandlerFunc, false); function storageEventHandlerFunc(evt) { alert("Storage event called key: " + event.key ); switch(event.key){ case 'one': case 'two': batteryDCMeter(); break; case 'extPowerOn': rechargeBattery(); break; } } sessionStorage.setItem("someKey", "someValue");