This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function api_get (){ | |
var url = "https://api.qpme.com/1.6/locations"; | |
$.getJSON(url, function(data){ | |
var size = data.length; | |
for(i = 0; i < size; i++){ | |
$('#mydiv').append(data[i].address + ' - ' + data[i].name + '<br>'); | |
console.log(data[i]); | |
} | |
}); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="img-flat_rate" style="float:left; margin-right:20px"> | |
<a class="img-big" href="example-big.png"><img src="example-small.png" alt="Flat Rate Example (iPhone)"/></a> | |
</div> | |
<script type="text/javascript"> | |
$('.img-big').imgPreview(); | |
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"></script> | |
<script> | |
function api_call(){ | |
var xhr; | |
// code for IE 10, Firefox, Chrome, Opera, Safari | |
if (window.XMLHttpRequest){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Base64 = { | |
// private property | |
_keyStr : "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=", | |
// public method for encoding | |
encode : function (input) { | |
var output = ""; | |
var chr1, chr2, chr3, enc1, enc2, enc3, enc4; | |
var i = 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function make_base_auth(user, pass) { | |
var tok = user + ':' + pass; | |
var hash = Base64.encode(tok); | |
return "Basic " + hash; | |
} | |
function api_call(){ | |
var xhr; | |
// code for IE 10, Firefox, Chrome, Opera, Safari | |
if (window.XMLHttpRequest){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE> | |
<html> | |
<head> | |
<title></title> | |
</head> | |
<body> | |
<form action="db-insert.php" method="post"> | |
<label for="firstName">First Name:</label> | |
<input id="firstName" name="firstName" value="" /> | |
<br> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$name = $_POST['feedback-name']; | |
$email = $_POST['feedback-email']; | |
$message = $_POST['feedback-box']; | |
$to = '[email protected]'; | |
$subject = 'QPME Feedback From Customer Terminal'; | |
$headers = 'From: [email protected]' . "\r\n" . | |
'Reply-To: [email protected]' . "\r\n" . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$.ajax({ | |
type: 'GET', | |
url: reportsUrl, | |
beforeSend : function(xhr) { | |
var base64 = Base64.encode(username + ":" + password); | |
xhr.setRequestHeader("Authorization", "Basic " + base64); | |
}, | |
contentType: 'plain/text', | |
xhrFields: { | |
withCredentials: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var country = $('.countryCodeAlpha2'); | |
var x = country.val(); | |
console.log(x); | |
VS | |
var country = $('.countryCodeAlpha2').val; | |
console.log(country); |
OlderNewer