Problem:
When using Canvas and making a image appear with a grayscale when loading, the images sometimes do not display.
Solution:
Use “onload” html attribute to change the image source after it gets a chance to load.
A Log of Coding Solutions
by Webhead
When using Canvas and making a image appear with a grayscale when loading, the images sometimes do not display.
Use “onload” html attribute to change the image source after it gets a chance to load.
by Webhead
Apparently no one cares about a user’s actual screen resolution. Usually I don’t too, but in this case I do. In creating a home page with an image as the background and expands as the user expands their window, the overflow is hidden. However for users with a low resolution this means that they cannot scroll to see what else is on the page.
The workaround for this is to detect the users screen resolution and change the css overflow attribute on the html, body tags to be “auto”. I have two monitors, one at 1600×1200 and another at 1024×768. On firefox and chrome the height values match with the javascript property screen.height. On IE the value is always 1200. I’m guessing it’s because the 1600×1200 monitor is my primary monitor.
by Webhead
The menu on this website: http://www.sohtanaka.com/web-design/side-navigation-tooltip-popup-bubble/ ran fine in IE. It was quick and worked fine. On my website however, it ran slooow.
Look for large images that may be loaded. IE doesn’t seem to handle them very well. The background image for my project was 1196×1150. Pretty large… Gotta adjust for the weakest browsers.
by Webhead
I have some ajax that pulls search results similar to how google images dynamically loads more images using javascript. So if the user clicks to see ‘page 2’ or ‘more’, javascript runs and fetches more images without the user leaving the page. If a user clicks on one of the results it will take them to another page. If the user then presses the Back button, the page that the user was on is lost because it’s as if they are visiting the page for the first time. A variable can be saved on the page to remember what page the user was on, but the onload javascript functions do not run when the back button is press.
One of the solutions on stack overflow works like a charm. The following code lets the “onload” or jquery “ready” functions run when the back button is presssed.
history.navigationMode = 'compatible'; $(document).ready( function(){ alert('test'); });
by Webhead
I was working with a customized CMS which uses the TinyMCE editor. This editor was placed in a subfolder to edit content meant for the root folder. This meant that the images in the TinyMCE editor would show something like “../images/” for the path to the images folder while the public pages would need something like “images/”. The problem with TinyMCE was that every time you insert an image it would show the absolute path, but when it saved, it would be a relative path.
To get TinyMCE to always use absolute paths, tell it to not use relative paths! In tinyMCE.init where you configure the editor, add the options under the “use absolute urls” comment
tinyMCE.init({ // General options mode : "textareas", theme : "advanced", width: "480", height: "400", //use absolute urls remove_script_host : false, relative_urls : false });
by Webhead
I wanted a way for users to upload multiple files to a server on a webpage. I found a great jQuery plugin that does drag & drop and multiple file upload. Under browser support you can see that IE is supported, however there are special notes. MSIE does not support drag & drop and multiple file support. So basically, the script works with IE where users can upload 1 file at a time.
From my research, it turns out that it is impossible to do multiple upload (same goes for drag and drop) to IE. The browser just simply does not support it. There are many scripts out there that say “multiple upload” and say it works with IE, but it’s not truly multiple file upload. The script actually just allows you to upload multiple files with one request, not select multiple files at one time. So in other words, the file browser opens and you can only select one file. Then you can open the file browser again and select another file. If you had 10 files, you would have to repeat this process 10 times instead of just highlighting multiple files if it had true multiple file support.
Anyway, that is the “workaround” which is not acceptable for me. So IE users just won’t have a multiple upload feature in my project.