Found 601 Articles for Front End Scripts

HTML5 SVG css3 transition on fill not working when there is external link

Nancy Den
Updated on 30-Jan-2020 06:13:20

75 Views

This cannot be done through the visited state. The best solution is to add a random query to url so that page go unvisited.

What are the differences between group and layer in KineticJs with HTML?

Daniol Thomas
Updated on 30-Jul-2019 22:30:22

345 Views

When making HTML5 web application using KineticJS, grouping, and layering need to be used.Groups are basically containers whereas layers are separators basically.The group is a container which is having shaped objects inside layers for ex group might contain both circle and rectangle.If a group is manipulated then elements within that group is also manipulated.ex if we drag the group then its elements get dragged as well.However, layers actually separate canvas elements that are at the top of one another. This is quite similar to the layers that work in Photoshop and Illustrator. Multiple layers are visible simultaneously.Layers are used to ... Read More

Effects and animations with Google Maps markers in HTML5

Samual Sam
Updated on 30-Jan-2020 06:11:17

137 Views

There is no way to fade markers through API.However, markers can be simulated by creating Custom Overlay.Custom overlay usually contains a div with the help of which opacity can be controlled by javascript or jquery.In order to create effects or animations over Google Maps markers, we need a custom overlay.The marker can be added to map and it surely makes optimized: false optionvar newmarkerimg= $('#map_canvas img[src*="iconmarker "][class!="imageadjust "]');

Open a file browser with default directory in JavaScript and HTML?

V Jyothi
Updated on 30-Jan-2020 06:10:44

957 Views

If you want to open a file browser in JavaScript and then want to set a default directory same as the file folder, then we cannot do it since windows do not allow you to do so,so it is not possible. For example:C: :\AmitThis is mainly due to security risk involved to let web code to set any value on the machine.We can never be assured that even directory exists or not.

Client side validation with HTML and without JavaScript

Krantik Chavan
Updated on 29-Jan-2020 10:53:36

173 Views

To display HTML5 client-side validation error bubbles, use the required attribute.You do not need to have javascript for client side validations like empty text box would never be submitted because HTML5 introduced a new attribute called required which would be used as follows and would insist to have a value:                    Enter email :          Try to submit using Submit button                    

Upload directly to Amazon S3 using Plupload HTML5 runtime

Lakshmi Srinivas
Updated on 30-Jul-2019 22:30:22

105 Views

Amazon S3 now supports cross-origin resource sharing so HTML5 uploads are now possible.Before it was not possible. Plupload can be directly uploaded to HTML5 by cross-origin resource sharing (CORS).With the help of CORS (Cross-origin resource sharing), rich client-side web applications can be created.It selectively allows cross-origin access to S3 resources with the help of which we can access Amazon.

Trick to store credentials in local storage

karthikeya Boyini
Updated on 30-Jul-2019 22:30:22

365 Views

Local Storage is designed for storage that spans multiple windows and lasts beyond the current session. In particular, Web applications may wish to store megabytes of user data, such as entire user-authored documents or a user's mailbox, on the client side for performance reasons.For storing credentials in local storage, on successful login, generate a completely random string unrelated to user credentials. You need to store this in the database. Do not forget to add an expiry date. Pass that string to the JavaScript to be stored in local storage.As long as the local storage credential matches the database and the ... Read More

Create a text inside circles in HTML5 Canvas

Nishtha Thakur
Updated on 29-Jan-2020 10:52:50

806 Views

To create a text inside circles in canvas, use the:context.beginPath();The following is the canvas:$("#demo").on("click", "#canvas1", function(event) {    var canvas = document.getElementById('canvas1');    if (canvas.getContext) {       var context = canvas.getContext("2d");       var w = 25;       var x = event.pageX;       var y = Math.floor(event.pageY-$(this).offset().top);       context.beginPath();       context.fillStyle = "blue";       context.arc(x, y, w/2, 0, 2 * Math.PI, false);       context.fill();       context = canvas.getContext("2d");       context.font = '9pt';       context.fillStyle = 'white';       context.textAlign = 'center';       context.fillText('amit', x, y+4);    } });HTML    

How to completely fill web page with HTML canvas?

V Jyothi
Updated on 29-Jan-2020 10:51:22

240 Views

To make canvas fill the whole page, you need to be 100% in width and height of the page.* {    margin: 0;    padding: 0; } body, html {    height:100%; } #canvas {    position:absolute;    height:100%; width:100%; }

How to allow the restricted resources from another domain in web browser with HTML5

Smita Kapse
Updated on 29-Jan-2020 10:50:07

229 Views

Cross-origin resource sharing (CORS) is a mechanism to allows the restricted resources from another domain in a web browserFor suppose, if you click on HTML5- video player in html5 demo sections. it will ask camera permission. if user allows the permission then only it will open the camera or else it doesn't open the camera for web applicationsHere Chrome, Firefox, Opera and Safari all use the XMLHttprequest2 object and Internet Explorer uses the similar XDomainRequest object, object.function createCORSRequest(method, url) {    var xhr = new XMLHttpRequest();    if ("withCredentials" in xhr) {       // Check if the XMLHttpRequest ... Read More

Advertisements