0 1 2 3 4

Issues


  • Javascript search item from an array of objects

    Using jquery grep to search an object from an array with a value of a specific key. For example searching like mysql ‘like’ var restaurants [{id:1, restname: ‘Cafe Namo’},{id:2,restname:’TefeCool’},{id:3,restname:’Ivans Resto’}]; var query_string = ‘fe’; $.grep(restaurants, function (e) { var search = new RegExp(query_string, “i”); return search.test(e.restname); }); Return value is [{id:1, restname: ‘Cafe Namo’},{id:2,restname:’TefeCool’}]

  • Google Maps Address Interaction(postcode) using

    I am using jquery, html5 for this example. HTML Load the google maps api link https://maps.googleapis.com/maps/api/js?sensor=true This will be the container of the google maps Note: Set height for your google map container. JS var map; var geocoder; //This function intialize the google maps settings function initialize() { geocoder = new google.maps.Geocoder(); var latlng =…

  • Enable Cross Domain AJax File Upload using jquery file upload plugin

    WHAT TO DO FIRST? 1. Enable Cross Domain Ajax Request 2.  Download Blueimp file upload. (I will be using this jquery file upload plugin for my ajax upload). START 1. First thing first is to initialize your file upload on the client side. //html <input id=”fileupload” type=”file” name=”file”> //javascript jQuery(“#fileupload”).fileupload({ url: //url for upload handler, datatype:…

  • Enable Cross Domain Ajax Request with Zend Framework 2

    Cross Domain Ajax Request  are forbidden by default because of their ability to perform advanced requests (POST, PUT, DELETE and other types of HTTP request, along with specifying custom HTTP Headers) that introduce many security issues as described in cross-site scripting. I discover some hack(i dont know whether it is an appropriate term for this but i…