Xstream Info
Xstream information in here PHP, learn ionic, learn HTML, learn WordPress coding examples and etc,..
Home
Home
29 Jul 2018
Call Waiting Codes for all Mobiles
Activate call waiting *43*#
Deactivate call waiting #43##
Check status of call waiting *#43#
24 Jul 2018
JavaScript on the Enter key in a text box and Value Submit | Trigger a Button Click on Enter
<input id="xxInput" value="Some text..">
<button id="xxBtn" onclick="javascript:alert('Hello Sam!')">Button</button>
<script>
var input = document.getElementById("xxInput");
input.addEventListener("keyup", function(event) {
event.preventDefault();
if (event.keyCode === 13) {
document.getElementById("xxBtn").click();
}
});
</script>
More Details:
Click
10 Jul 2018
Get City Name Using Google Geolocation
<script type="text/javascript" src="https://code.jquery.com/jquery-2.2.3.js"></script>
<script type="text/javascript">
navigator.geolocation.getCurrentPosition(success, error);
function success(position) {
var GEOCODING = 'https://maps.googleapis.com/maps/api/geocode/json?latlng=' + position.coords.latitude + '%2C' + position.coords.longitude + '&language=en';
jQuery.getJSON(GEOCODING).done(function(location) {
jQuery('#country').html(location.results[0].address_components[5].long_name);
jQuery('#state').html(location.results[0].address_components[4].long_name);
jQuery('#city').html(location.results[0].address_components[2].long_name);
jQuery('#address').html(location.results[0].formatted_address);
jQuery('#latitude').html(position.coords.latitude);
jQuery('#longitude').html(position.coords.longitude);
})
}
function error(err) {
console.log(err)
}
</script>
Newer Posts
Older Posts
Home
Subscribe to:
Posts (Atom)