if (typeof FileReader !== "undefined") { var size = document.getElementById('upload_file').files[0].size; size = Math.round(size / 1024); console.log(size+' KB'); }
Category: HTML
How to know the mode the browser running with ? i.e. Standards Mode, Quirks Mode ... In Firefox and Opera you can determine if your browser is in "quirks mode" by checking page info. Using document.compatMode, will tell you the mode you are in with most browsers. In Chrome, Safari, and IE, run this javascript in the address … Continue reading How to know the mode the browser running with ?
How to make flash objects overlaid by another html elements? simply by using the wmode attribute and set it to transparent wmode - Possible values: window, direct, opaque, transparent, gpu. Sets the Window Mode property of the SWF file for transparency, layering, positioning, and rendering in the browser. If this attribute is omitted, the default value is "window". For more … Continue reading Flash objects overlay problem
Issue A SWF file in a layer on a DHTML page containing several layers displays above all the layers regardless of the layers' stacking order ("z-index"). Solution Use the WMODE parameter to allow layering of rich media content with DHTML layers. The WMODE parameter can be "window" (default), "opaque," or "transparent." Using a WMODE value … Continue reading SWF flash files ignore stacking order, play on top of DHTML layers
Obviously, if you've created a page specifically for iPhone and iPad users, the first thing you'll need to do is to find out when a user is visiting your site via an iPhone or iPad. Apple provides the iPad's user agent string, which appears as follows: Mozilla/5.0 (iPad; U; CPU OS 3_2 like Mac OS … Continue reading Detecting the iPhone and iPad
Don't put a form inside a table, instead put table inside form Wrong approach: <table> <form id="form-id" method="POST" action"action.php"> <tr><td><!-- form inputs --> </td></tr> </form> </table> Correct approach: <form id="form-id" method="POST" action"action.php"> <table> <tr><td><!-- form inputs --> </td></tr> </table> </form> If you put the form inside the table, the … Continue reading Don’t put a form inside a table