Technology?A site for testing the new tools I'm building, and a little talk about what I'm learning on the way.. |
Javascript DOM Ready for SSL in IEWednesday, December 30, 2009 Many of the existing javascripts snippets you see on the internet to determine whether the DOM is fully loaded do not work properly in Internet Explorer when using the HTTPS secure protocol. The "normal" script is as follows and works great for HTTP but will through unsecure item warnings in IE because it adds a script element to the page. Here is the updated script which works with both secure and unsecure connections: Javascript Replace All with VariableMonday, December 28, 2009 Here is how you replace all values in a string with another string which is inside of a variable using Javascript: var str = "Please change all the change words in this sentence."; var searchfor = "change"; str = str.replace(new RegExp(searchfor, 'g'), "changed"); The resulting value for str would be: "Please changed all the changed words in this sentence."; Javascript Transition EffectsFriday, January 25, 2008 Here are some samples of some basic javascript transition effects. We are thinking about putting some of these nifty effects into certain areas of .geographical media. It seems to be rather trendy these days to do so. I have created the following effects: Fade In, Fade Out, Fly Out and Drop Out, Drop Back The effects are all very easy to do with Javascript adjusting the style properties of the object you wish to have the effect on. I found the opacity properties here at quirksmode http://www.quirksmode.org/js/opacity.html . I consider quirksmode to be the best source of well tested solutions to some of the more complex aspects of javascript programming. I've used his work often and would recommend his site to anyone. Here are the sample effects: http://joshua.perina.com/transition-effects I'll write more and explain the code once I've cleaned it up a bit. At the moment it's just 1/2 hour quick prototype.
|