A JavaScript-In-Email Gotcha
Publishing JavaScript in email has an uncertainty, a gotcha: The software used to read the email may react unexpectedly to the script tag.
JavaScript needs to be between script tags to run. But because of the uncertainty, and unless the sender knows in advance what software will be used to read the email, JavaScript in email is best published without the script tags.
Some email reading software will remove the script tags. Others will disable them in some way, perhaps by inserting a period or other character in front of the "script" keyword. The software might even refuse to display the email past the occurrence of the script tag or not display any part of the email at all.
Therefore, we leave script tags out of JavaScript quoted in the Possibilities ezine.
When you see JavaScript code published in the ezine, put it between script tags in order to use it. As an example, let's suppose Possibilities publishes this line of JavaScript:
if( top.location != location ) { top.location = self.location; }
Placing it between script tags would look like this:
<script type="text/javascript"> if( top.location != location ) { top.location = self.location; } </script>
(For HTML5 web pages, the type="text/javascript" attribute is optional.)
Script tags are included with complete JavaScript source code in the weekly article the Possibilities ezine links to. Just not the JavaScript code published in the ezine itself, as it's delivered by email.
Will Bontrager