Tag: javascript

  • Size conversion filter using AngularJS

    Following code should give you a clean and simple example of custom filter using AngularJS. HTML code: ——————— <!doctype html> <html > <head> <script src=”src=”http://code.angularjs.org/angular-1.0.0rc6.min.js”></script > <script src=”filter.js“></script> </head> <body> <div ng-app=”testFilterApp“> <label>Size in Byte:</label> <input type=”text” ng-model=”sizeInB” placeholder=”Enter a name here”> <hr> <h2>Human Readable Size (precision:3) {{sizeInB | sizeConverter:3}}!</h2> <h2>Human Readable Size (precision: not…

  • Using colorbox(a jquery plugin) ajax in a complex situation

    Colorbox is a lightweight customizable lightbox plugin for jQuery. I am using colorbox for another perpose: to show a (semi!) modal window to show information on ajax call. You can get the plugin here . Here I’ll give a simple example how to load ajax data and show through colorbox plugin. In second phase i’ll…

  • Php page redirection problem

    So far i did web development I used javascript redirection. But recently i needed to do that with php. But i got stacked with some annoying problems. 1. Headers are already sent. 2. SESSION variables are not setting. 1. Ok, now here javascript again rescue me see how. function redirect($url) { if(!headers_sent()) { //If headers…

  • ফরম ব্যবহার না করে js দিয়ে newTab-এ data পাঠানো…

    আমার মনে হয় এই পোস্টটি অনেকের কাজে আসবে। খুবি সোজা technique. আমি example দিচ্ছি। ধরুন আপনি ফরম submit/use না করেই javascript ব্যবহার করে কোন page -এ data পঠাতে চাচ্ছেন, এবং new page’ টি আপনি new Tab-এ open করতে চাচ্ছেন। আনাকে যা করতে হবে তা হল- এ্কটি js function লেখা।-