
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

214 Views
No, HTML5 does not allow you to interact with local client files directly. You can use drag and drop or FileSystem API for this.ExampleLet us see an example of drag and drop on a web browser using HTML5 − #boxA, #boxB {float:left;padding:10px;margin:10px; -moz-user-select:none;} #boxA { background-color: #6633FF; width:75px; height:75px; } #boxB { background-color: #FF6699; width:150px; height:150px; } function dragStart(ev) { ev.dataTransfer.effectAllowed='move'; ... Read More

770 Views
You can use SVG to create a World Map and work with raphaeljs.Firstly, learn how to add Raphael.js, and create a circle,var paper = Raphael(10, 50, 320, 200); // drawing circls var circle = paper.circle(50, 40, 10); circle.attr("fill", "#f00"); circle.attr("stroke", "#fff");Then refer the following to create a World Map.

209 Views
The following are some of the best frameworks for HTML5 based mobile development −Kendo UIUse Kendo UI to develop an invaluable cross-platform mobile application.BootstrapBootstrap supports HTML, CSS, and JS that allows developing mobile apps with responsive layouts.IonicIonic is an open-source framework used for developing mobile applications. It provides tools and services for building Mobile UI with a native look and feel. The ionic framework needs a native wrapper to be able to run on mobile devices.Sencha TouchSencha Touch is a mobile application framework to develop user interface for mobile apps using HTML5, CSS3, and JavaScript. It assists the developers in ... Read More

5K+ Views
Recreate the socket to reconnect it. The websockets are designed to stay open. You can also go with the method to have the server close the connection. Through this, the websocket will fire an onclose event and would amazingly continue attempting to make the connection.In addition, when the server is listening again the connection will be automatically reestablished.ExampleYou can try to run the following code to reconnect to WebSocket −// Socket Variable declaration var mySocket; const socketMessageListener = (event) => { console.log(event.data); }; // Open const socketOpenListener = (event) => { console.log('Connected'); mySocket.send('hello'); }; // Closed ... Read More

201 Views
Use the pushSate object to update the page when the user navigates back through history. Let us see an example to include the selected color that creates a history entry −function display(color) { var myState = { selectedColor: color }, myTitle = "Page title", myPath = "/" + color; history.pushState(myState, myTitle, myPath ); };Now we will use the popstate event to update the selected color −$(window).on('popstate', function(event) { var myState = event.originalEvent.state; if (statemyState { selectColor( myState.selectedColor ); } });

128 Views
To achieve your goal for HTML5 Server-Sent Events −Try polyfillIt would work for IE10 and IE11 as well. It starts with −if ("EventSource" in global) return;It only runs in web browsers that do not support EventSource.Refer the following GitTry websockets Works for IE10 and IE 11 and it also provides bi-directional communication options.

245 Views
To detect HTML5 audio MP3 support, use the Modernizr library.As stated in the official specification − Source − Screenshot from the official Modernizr documentation For detecting HTML5 audio MP3 support, you can also check the User-Agent to detect which browser is used.You can also use JavaScript to test −var x = document.createElement('audio'); return !!(x.canPlayType && x.canPlayType('audio/mpeg;').replace(/no/, ''));