Jquery Preview Upload Image

I just got a micro site project, one of the feature is User have to upload a picture and before submitting it, there will be a preview for the picture first. So i browser around to get a glimpse how to do that, and here it is. <script src=”http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js”></script> <div id=”gallery_upload_container”> <img id=”previewing” src=”https://s.w.org/style/images/wp-header-logo.png”> </div> …

Get Paramater with Javascript

Normaly we get parameter in php is with $_GET[“”], but get paramter with javascript its a different case. Hopefully this will help : <script> var search = window.location.search.substring(1); var complete_param = search.split(“&”); for(var i=0;i<complete_param.length;i++) { var single_param = complete_param[i].split(“=”); if (single_param[0] == variable) { return single_param[1]; } } </script> **variable = is the parameter that …