Posts Under internet explorer Category
IE9 adding empty table cells in large table
Well as usual, we are once again fighting the woes of the beloved Internet Explorer, and it appears that Microsoft’s latest greatest new and improved browser rival to the market IE9 still has a whole bunch of irritations and retardation to worry about (saw that one coming). Today I was busy loading a massive amount of data into the body of a table using ajax and in Firefox and even…
Test IE versions on any machine!
Do you do web development and are unable to test your software in old shitty versions of Internet Explorer? If so then you may want to read on a little bit. Microsoft has got a whole bunch of virtual images you can download for FREE(not a usual Microsoft word) over here: http://www.microsoft.com/downloads/en/details.aspx?FamilyId=21EABB90-958F-4B64-B5F1-73D0A413C8EF&displaylang=en They contain an operating system and an install of your favourite IE version! Hooray! They have IE6 on…
IE6 PngFix in Javascript
As a web developer you will know just how much we all love hate Internet Explorer 6 – one of the most dreaded browsers and browser versions that still exists in the deep dark corners of the interwebs – and you will probably have figured out that it doesn’t play well with PNG images. So here is how you can resolve this problem. It’s not as nice as an actual…
PNG Transparency in IE 6 Using Javascript
Earlier versions of Microsoft Internet Explorer(IE6 and below) didn’t know how to handle the transparency in PNG image files. Luckily this can (somewhat) be corrected using some Javascript. Include the following function in either your site’s javascript file or in the head of your HTML document. function bgPng(){ for(i=0; i<document.all.length; i++) { var bg = document.all[i].currentStyle.backgroundImage; if(bg.match(/\.png/i) != null) {…
Stop mouse click in browsers
There have been multiple ways to stop your user/s from right clicking on your site, but many of them now fail due to the way firefox’s contextual menu loads. Below is an example of how to do it: function _c(e) {if (document.all) {if (event.button==2||event.button==3) {return false;}} else {if (e.button==2||e.button==3) {e.preventDefault();e.stopPropagation();return false;}}if (e.which) {}}if (document.all){document.onmousedown=_c;}else{document.onclick=_c;document.ondblclick=_c;}</span> ..and here is the full working example in a webpage: <html> <head> <script> function _c(e) {if…
Force Download in PHP
This script works in all browsers, including Internet Explorer! if (strstr($_SERVER[‘HTTP_USER_AGENT’],"MSIE")) { header("Pragma: public"); header("Expires: 0"); header("Cache-Control: must-revalidate, post-check=0, pre-check=0"); header("Cache-Control: private",false); header("Content-Type: application-download"); header("Content-Disposition: attachment; filename=\"".basename($filename)."\";"); header("Content-Transfer-Encoding: binary"); header("Content-Length: ".@filesize($ab_file)); set_time_limit(0); } else { header("Content-type: application-download"); header("Content-Length: ".filesize($ab_file)); header("Content-Disposition attachment; filename=".$filename); } readfile($ab_file);
Don't cache my swf files!
I often have issues where ‘dumb browsers’ cache my published swf files and when they dynamically populate they don’t always update. This is SUPER annoying and I have found a solution. I will demonstrate the technique with a LoadsVars example var nc = Math.floor(random(1000000) / random(1000)); var send_lv:LoadVars = new LoadVars(); send_lv.sendAndLoad(_root.siteURL+"profile.php?action=showallimages&nc="+nc, result_lv, "POST"); So let me describe what is happening here. The really ‘dumb browsers’ like IE7 in this…
Transparent swf in html
So you have now placed a swf file into your html page and you want to be able to see through it. Lucky for you, this is a very easy thing to do! The following code does the trick: <object type=‘application/x-shockwave-flash’ data=‘flash/home_side_left.swf’ width=’40px’ height=’550px’> <param name=‘movie’ value=‘flash/home_side_left.swf’ /> <param name=‘bgcolor’ value=‘#ffffff’> <param name=‘wmode’ value=‘transparent’> <param name=‘allowScriptAccess’ value=‘always’> </object> Notice that by just adding the ‘wmode’…
How to correctly form HTML
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Strict//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd”> <html xmlns=”http://www.w3.org/1999/xhtml”> <head> <!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Strict//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd”> <html xmlns=”http://www.w3.org/1999/xhtml”> <head> <meta http-equiv=”Content-Type” content=”text/html; charset=UTF-8″ /> <script type=”text/javascript” src=”javascript/javascriptfilename.js”></script> <title>Title goes here</title> <link href=”stylesheetname.css” rel=”stylesheet” type=”text/css” /> </head> <body> Page content goes here </body> </html>
Trying to get variables into flash from the browser!
Ever wondered how to get variables from an html page to a flash element? Well, it’s quite easy using the following actionscript 2 example: I use javascript to embed my flash elements: <embed src=”somefilename.swf?varname=varvalue&vartwo=var2value” width=”550″ height=”400″></embed> Now in Flash I can just call: _root.varname and it will give us `varvalue` _root.vartwo will give us `var2value` Wasn’t that easy?
TypeError: node is null message=node is null
The following error message occurs in Firefox 3 when using Firebug. TypeError: node is null message=node is null The error can be tracked back to script tags being in the head of the document instead of where they’re needed, an example would be with the ShareThis control/component that is often added to blogs and etc.
Guillotine-Bug? Bug
Yes, it’s called a Guillotine-Bug and it’s yet another bug IE users get to look forward too So how does it work? Basically, the hasLayout messes around and elements become invisible and visible according to random things. Rather silly, but a bit of a bitch to initially figure out. So how do you fix it? Try this: in your css file add: * html .container {height: 1%;} .container:after { content:…