Dynamic Drive DHTML code library!
Dynamicdrive.com


.
spacer.gif (807 bytes)
.

Menu

Search DD
Recommend DD
Help Forums New
DHTML books
Advertising
Contact

Featured Script
Rollover buttons 

Turn regular form buttons into rollover menus with this script!
.

Partners

Free JavaScripts
.

Link to DD

Do you use scripts from Dynamic Drive? Please give something back by linking to us...
.
spacer.gif (807 bytes)

Dynamic Drive DHTML Newsletter!
October 10th, 1999 Issue #12
Dynamic Drive URL: http://dynamicdrive.com

Welcome to the Dynamicdrive.com DHTML newsletter, the DHTML newsletter that keeps you informed on the latest updates to Dynamicdrive.com, and news, tips, and tutorials on the DHTML technology!

------------------Newsletter begins here-----------

1) New DHTML scripts added to Dynamic Drive
2) DHTML Tip- Suppressing those JS pop up error messages
3) Netscape 4.7 debuts, delays 5.0 trial release
4) IE 5 bug alters saved webpages

----------------------------------------------------

1) New DHTML scripts added to Dynamic Drive

-Dynamic countdown script [All] http://dynamicdrive.com/dynamicindex6/dhtmlcount.htm

With the millennium just around the corner and all, we thought it might be fun to create a dynamic countdown script that counts down to this glorious occasion, all the way down to the last second. Of course, we don't exactly want this script to become obsolete as soon as the party is over, so the script is configurable to count down to other dates as well. Let's just hope computers are still running after that!

-Browser redirect script [All] http://dynamicdrive.com/dynamicindex11/bredirect.htm

This is a DHTML redirect script that sends your visitors to three different pages, depending on whether she is using NS 4+, IE 4+, or neither. It's a fool-proof way to ensure that only the intended browser gets to see and run a browser-specific DHTML script.

-Flashing form element [IE] http://dynamicdrive.com/dynamicindex11/flashform.htm

Starring at any form, it's easy to start mistaking one thing with another (ever accidentally hit the Reset button over Submit?). Use this DHTML script to make certain form elements stand out, by making them flash. It's really quite a cool and useful script, if we may say so ourselves!

-Pop-up 2.2 by Lefteris Haritou [All] http://dynamicdrive.com/dynamicindex1/pop-up/popmenu.htm

Lefteris presents version 2.2 of his popular pop-up menu script, which flushes out a bug in NS 4, and adds support for new color styles. Do check it out...


2) DHTML Tip- Suppressing those JavaScript pop up error messages

You hate 'em. Your visitors hate 'em. Heck, even your browser isn't all that fond of them. JavaScript error messages, that is. Well, what everyone doesn't like, someone usually comes up with the means to get rid of them, as in this case. Many people don't know this, but there's actually a quick and dirty way of ensuring that JavaScript error messages never pop up on your page, regardless of what kind of hell the containing script may try to cook up. You see, starting in NS 3 and IE 4, your browser supports what's called error handling, allowing you to programmatically detect and suppress a scripting error before it hits your visitors in the face. To accomplish this, a simple error suppression script will suffice:

<script>
window.onerror=new Function("return true")
</script>

Just add the above code to the <HEAD> section of your page, proceeding any other scripts, and all potential JavaScript errors are muted.

Is it a good idea to use error suppression scripts? Well, before continuing with our opinion, it's interesting to note that NS 4+ (not IE 4+) by default already hides all JavaScript errors, by redirecting the resulting error messages to what's called a JavaScript console (http://developer.netscape.com/docs/technote/jsconsole.html). The console is normally hidden from view, and the only reasonable way your visitors- and yourself- know a scripting error has occurred is by looking at the status bar, which contains a notification of such an event. Error suppression scripts take that concept one step further, by completely hiding the errors, without saving the resulting messages in some console. As such, we suggest caution when using them. Error messages are your friend (as hard as that is to believe), just not your visitors', for they tell you when a script is acting up, and the opportunity to correct it. You should always initially comment out (//) the error suppressor when inserting and testing scripts on your page, and uncomment it only after that phase is over.


3) DHTML News- Netscape 4.7 debuts, delays 5.0 trial version release to add new features

Attention Mozilla lovers out there, earlier this month, AOL officially released Netscape 4.7. The updated browser includes the latest versions of AOL Instant Messenger, Shockwave, Flash, RealPlayer G2, as well as a new Shop@Netscape button (which gives you quick access to Netcenter's online shopping channel). FYI, the new shopping button looks like any regular toolbar button, and appears to the left of the default "Stop" button. Forgive us as we go a little off course here, but is it just our imagination, or is the Netscape browser becoming more and more commercial and self-serving as time goes by? The previous update already intruded sacred grounds by showing you banner ads whenever you download something, and now, a shop button to drive traffic to their own web store? Oh Please! In any event, you may download NS 4.7 at Netscape's Homepage (http://www.netscape.com). If you ask us, we suggest simply holding out for NS 5, which hopefully will return with the things that made Netscape once the king in it's field.

And speaking of the devil, according to a just-in report by Cnet, the release date of NS 5 trial version will be pushed back from it's original summer deadline to allow time for the development and integration of new features. Among those in line is something for us web developers- XUL support. Pronounced "zuul", XUL may sound like something that came out of the jungle, but we can assure you it's no monkey feature. Based on the XML architect, XUL allows you to access and customize the default look of the browser using a combination of XML and common web languages (such as JavaScript). Imagine being able to modify the look of your visitor's browser when they enter your site to fit the look and needs of it. Browser components such as the toolbar, location bar, menu items, overall "skin" are all configurable to your liking. We say, cuul! The technology is still in it's infancy, so the docs on it are sparse. Chew on the following resources in the mean time:

http://www.mozilla.org/xpfe/xptoolkit/xulintro.html http://news.cnet.com/news/0-1005-200-340440.html


4) DHTML News- IE 5 bug alters saved webpages

Here's an interesting (yet potentially problematic) bug in IE 5 that was recently uncovered by a web developer. Apparently, whenever you save a webpage in IE 5 via the default "Webpage Complete" mode (which saves not only the HTML page, but all accompanying files such as images etc), IE 5 alters the saved webpage slightly, by striping off the quotations surrounding all HTML attributes in your page. For example, a tag such as

<img src="dynamic.gif">

becomes

<img src=dynamic.gif>

after the save. We ran our own little test, and confirmed this behavior of Microsoft's latest browser.

Now, this is troublesome in two ways.

First off, as useless as those quotes may seem, I think you would much rather prefer YOURSELF be the judge of that, and not Bill Gate's internet roamer. HTML hardcores will argue that those thingies should always be present around attributes, for the sake of proper HTML coding, if nothing else. And on that note comes the second -and more serious- reason why IE's strip tease on your webpage can be problematic.

XML, whether you or I like it, is here to stay. In fact, six months from now, you may very well get the dreadful call from your boss to start converting existing HTML documents to XML instead. Quotes around HTML attributes is expected from your webpage of any XML parser before it can begin doing the grunt work of converting HTML to XML for you. A webpage that has previously been saved through your IE 5 browser will choke this parser, your best friend, something you definitely don't want to do.

There is a way to prevent IE 5 from mucking around when saving your webpages, and that is by selecting "Web pages Only" (instead of the default "Webpage Complete") for the Type when the Save Dialog pops up. Problem solved, but then again, what the heck are you doing saving *your* webpages using a browser in the first place anyways?


-Submit a guest article
The Dynamic Drive newsletter now accepts guest appearances! If you've written a great article on DHTML, web programming or design, and wish to share it with our community of webmasters, drop us a note, at dynamicdrive@yahoo.com. Included articles will contain full credits, including a direct link back to the author's site...

-Link to Dynamic Drive!
Show your support for Dynamic Drive by linking to us. Visit http://dynamicdrive.com/link.htm for cool graphics to use. Thanks!

-Got JavaScript?
Visit Website Abstraction (http://wsabstract.com), our content partner, for the best stuff JavaScript!


This concludes the 12th edition of the Dynamic Drive DHTML newsletter. If you have a moment, please forward this newsletter to your friends and co-workers who may be interested in receiving it. In the next issue, we'll review Wrox's popular DHTML book: "IE 5 Dynamic HTML Programmer's Reference." We got the book a little late from Wrox, and thus the delay...see you again soon!

-----------------------------------------------------------------

Recommend Us!
-If you like Dynamic Drive, please recommend us to a friend...

Legend
All- Script works with Netscape 4 AND Internet Explorer 4+
NS- Indicates script works with Netscape 4 (NOT NS 6 yet)
IE- Indicates script works with Internet Explorer 4 and above
NS6!- Temporary index set up on script category pages to indicate script works in NS6


Copyright © 1998-2004 Dynamic Drive. Please read Terms Of Use here before using any of the scripts.
Partners: JavaScript Tutorials | JavaScript Reference