function populatesearch() { } function sitejoinedclick(siteid,jstate) { if (confirm("Would you like to create an account so you can keep track of the survey sites you've joined?")) { location.href="join.asp"; } else { document.getElementById("joinedyes"+siteid).checked=false; document.getElementById("joinedno"+siteid).checked=false; } } $(document).ready(function () { $('#dtBasicExample').DataTable( { responsive: true, "bFilter": false, "bLengthChange": false }); }); function dosearch() { var rewardsids=""; for (var cr=0; cr<$(".rewardsdd").dropdownCheckbox("checked").length; cr++) { if (rewardsids.length>0) { rewardsids = rewardsids+ ","; } rewardsids = rewardsids + $(".rewardsdd").dropdownCheckbox("checked")[cr].id; } var earningtypes=""; for (var cr=0; cr<$(".earningtypesdd").dropdownCheckbox("checked").length; cr++) { if (earningtypes.length>0) { earningtypes = earningtypes+ ","; } earningtypes = earningtypes + $(".earningtypesdd").dropdownCheckbox("checked")[cr].id; } var countrycodes=""; for (var cr=0; cr<$(".countriesdd").dropdownCheckbox("checked").length; cr++) { if (countrycodes.length>0) { countrycodes = countrycodes+ ","; } countrycodes = countrycodes + $(".countriesdd").dropdownCheckbox("checked")[cr].id; } var searchurl="gridajax.asp?reviewbutton=&searchkeywords=" + escape(document.getElementById("searchkeywords").value) + "&ourrating=" + document.getElementById("ourrating").value + "&rewardsids=" + rewardsids + "&earningtypes=" + earningtypes + "&countrycodes=" + countrycodes + "&ali_hash="; document.getElementById("searchbutton").style.display="none"; document.getElementById("loadingimg").style.display=""; $.ajax({ type: "GET", url: searchurl, success: function (result) { updategrid (result); }, error: function (xhr, ajaxOptions, thrownError) { alert(xhr.status); alert(thrownError); } }); } function initializegrid() { var searchurl="gridajax.asp?reviewbutton=" + "&ali_hash=&rooturl=&ali_email="; $.ajax({ type: "GET", url: searchurl, success: function (result) { updategrid (result); populatesearch(); }, error: function (xhr, ajaxOptions, thrownError) { alert(xhr.status); alert(thrownError); } }); } function updategrid(result) { document.getElementById("dtBasicExample").innerHTML=result; document.getElementById("searchbutton").style.display=""; document.getElementById("loadingimg").style.display="none"; }