Karthikeya Boyini has Published 2193 Articles

Retrofit existing web page with mobile CSS

karthikeya Boyini

karthikeya Boyini

Updated on 29-Jan-2020 06:37:40

152 Views

To retrofit, use the CSS media queries, and allow different stylesheets to different browser capabilities. A benefit is that you do not have to go for any server-side code.This would require you to add specific detection code to the script for grouping of the device.The media queries handle even devices ... Read More

HTML5 audio not playing in PhoneGap App

karthikeya Boyini

karthikeya Boyini

Updated on 29-Jan-2020 06:27:24

208 Views

If you have set all the attributes and audio source correctly, then this can be a security issue.Add the following in your index.html.Set the AndroidManifest.xml as

How can we create a new MySQL table by selecting specific column/s from another existing table?

karthikeya Boyini

karthikeya Boyini

Updated on 29-Jan-2020 05:16:32

242 Views

As we know that we can copy the data and structure from an existing table by CTAS script. If we want to select some specific column/s from another table then we need to mention them after SELECT. Consider the following example in which we have created a table named EMP_BACKUP1 ... Read More

Getting Safari to recognize
HTML 5

karthikeya Boyini

karthikeya Boyini

Updated on 28-Jan-2020 10:19:15

135 Views

To make a element to be recognized by Safari:main {    display: block;    width: 800px;    height: 800px;    background-color: #0C0; }You need to focus on:main {    display: block; }

The dragLeave event fires before drop for HTML5 drag and drop events

karthikeya Boyini

karthikeya Boyini

Updated on 28-Jan-2020 10:02:35

336 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)); }

Does 'position: absolute' conflict with flexbox?

karthikeya Boyini

karthikeya Boyini

Updated on 28-Jan-2020 09:21:30

281 Views

Absolutely positioning will not conflict with flex containers. You need to set the parent width and values as well:.parent {    display: flex;    justify-content: center;    position: absolute;    width:100% }The following is the HTML:    text

Difference between div~div and div:not(:first-of-type)?

karthikeya Boyini

karthikeya Boyini

Updated on 28-Jan-2020 09:18:12

137 Views

Both are same in terms of matching elements. Let us see an example:                             If you have CSS rules with both selectors matching the same elements, then your div: not(:first-of-type) will get precedence due to the: first-of-type pseudo-class.

How to set focus on a text input in a list with AngularJS and HTML5

karthikeya Boyini

karthikeya Boyini

Updated on 28-Jan-2020 08:30:41

489 Views

To set focus on a text input in a list, try the following code:newApp.directive('focus', function () {    return function (scope, element, attrs) {       attrs.$observe('focus', function (newValue) {          newValue === 'true' && element[0].focus();       });    } });The following is the HTML:{{cue.isNewest}}

Error codes returned in the PositionError object HTML5 Geolocation

karthikeya Boyini

karthikeya Boyini

Updated on 28-Jan-2020 08:27:49

406 Views

The following table describes the possible error codes returned in the PositionError object:CodeConstantDescription0UNKNOWN_ERRORThe method failed to retrieve the location of the device due to an unknown error.1PERMISSION_DENIEDThe method failed to retrieve the location of the device because the application does not have permission to use the Location Service.2POSITION_UNAVAILABLEThe location of ... Read More

How to delete Web Storage?

karthikeya Boyini

karthikeya Boyini

Updated on 28-Jan-2020 08:11:29

296 Views

Storing sensitive data on local machine could be dangerous and could leave a security hole. The Session Storage Data would be deleted by the browser immediately after the session gets terminated.To clear a local storage setting you would need to call localStorage.remove('key'); where 'key' is the key to the value ... Read More

Advertisements