Is this how I would for getJSON with proxyURL?
Is this how I would do for proxyURL in getJSON? This is the
tutorial I'm following except Ben was using .ajax instead of getJSON.
function GetArticles(){
$('#searharea').keyup(function() {
var searchField = $('#searharea').val();
var myExp = new RegExp(searchField, "i");
$.getJSON('ajaxProxy-KB.cfm', {proxyURL: '
https://app.mysite.com/api/head/article.json',
name: {
$regex: searchField,
$options: "i"
}},
function(data) {
//console.log( data.valid, data.data); // data.data is an array of information!
var output = '<ul class="searchresults">';
$.each(data.data, function(i, article) {
output += '<li>';
output += '<h5><a href="
https://kb.mysite.com/help/pdfexport/id/'+ article.id + '">' + article.name + '</h5>';
output += '</li>';
});
output += '</ul>';
$('#resultarea').html(output);
}); //get JSON
});