010104.html JavaScript Back Button | WebReference

010104.html JavaScript Back Button


((((((((((((((((( WEBREFERENCE UPDATE NEWSLETTER ))))))))))))))))) January 4, 2000


This newsletter is sponsored by: NetMechanic and BOT 2001 Seminar __________________________________________________________________


Spending Too Much Time On Web Site Maintenance?

Manually reviewing your site for common errors such as broken links, HTML code problems and browser inconsistencies takes countless hours and causes unnecessary frustrations! Let HTML Toolbox examine your site and help eliminate errors in minutes!

Free trial at: http://www.netmechanic.com/ads/f215.htm


http://www.webreference.com/ *- link to us today http://www.webreference.com/new/ *- newsletter home http://www.webreference.com/new/submit.html *- submit article

This week Danny Mather shows us how to extend Dreamweaver (which he has also won) with Extensions. New JavaScript/DHTML functionality is only a double click away.

New this week on WebReference.com and the Web:

1. TWO CONTESTS: Signup & Win, Submit & Win! 2. FEATURED ARTICLE: Extending Dreamweaver 3. NET NEWS: * Comparing PHP with Perl for Dynamic Web Pages * Using XML Attribute Values * The Future of the Web * Search Terms of Endearment

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1. TWO GREAT CONTESTS: Submit & Win!, Signup & Win

>Submit & Win Macromedia Flash 5 FreeHand 9 Studio!

Submit your article today and you could win Macromedia's powerful Dreamweaver 4 Fireworks 4 Studio software. If your article makes the cut, and we publish it in this newsletter, you win! See the submission page for details:


This week, Danny Mather shows us how create and use extensions for Dreamweaver. As DW is based on open standards (CSS, HTML, and JavaScript), extending Dreamweaver is a lot easier than adding a feature to Word. Once you've created or downloaded your new extension, extending Dreamweaver and adding the JavaScript gizmo to your page is just a click away.

>Signup & Win!

Sign up for the Webreference Update newsletter, and you could win a killer software bundle from BoxTop Software and Insider Software including ProJPEG, SuperGIF, and SpaceAgent. Each week we'll draw new winners from our new subscribers - you could be next. Already a subscriber? Not a problem - just fill out the form, and you'll be automatically entered to win. Tell your friends!


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2. FEATURED ARTICLE: Extending Dreamweaver

Macromedia Dreamweaver has long been my 'editor of choice' for creating Web sites. Every editing program I've used has had its limitations but Macromedia appears to have found a way to make its Web authoring tool almost limitless: they let you build it yourself.

The Dreamweaver program itself is built using HTML, JavaScript and XML; just like a Web page. This means that early Dreamweaver users were able to extend the abilities of the program and add commands and menu items that didn't exist. (it was possible, but it wasn't easy.) Macromedia has since started its 'Dreamweaver Exchange', making it as simple as downloading and double clicking the command you want to add. And some of these commands are pretty advanced.

Some of my favorites: A self-centering pop-up window. A premade calendar. JavaScript form field validation.

Advanced JavaScripts that used to take an hour to hand code now take me a couple clicks. You don't even need to KNOW JavaScript to add advanced features to your page. What you DO need:

A copy of Dreamweaver. A copy of Extensions Manager.

Here's where to find extensions:




http://www.yaromat.com/ http://people.netscape.com/andreww/dreamweaver/customtags.html http://www.massimocorner.com/ http://www.projectseven.com/dreamweaver/index.htm http://dreamweaverfever.com/grow/ http://thecomb.tripod.com/dream.htm

Authorized Extensions vs. Unauthorized ones:

There are two kinds of extensions, 'authorized' and 'unauthorized.' Authorized means that the good people of Macromedia have checked it out and it appears to do what it says without causing any problems. Unauthorized means that it may work or it may give you errors. I've found a few that gave me errors but not many.

But I Want To Build My Own!

You can do this too. The easiest way is to find out how other people did it. Find an extension similar to yours, install it with Extensions Manager, then go looking for it on your hard drive. When I download an extension it usually ends up in C:\Program Files\Macromedia\Dreamweaver 3\Configuration\Objects\Invisibles.

A simple extension (or MXP file) is made up of three or four parts, with lots of variations:

1. The HTML file that calls the JavaScript. 2. The GIFs used 3. The JavaScript that does the work. 4. The MXI file that tells Extensions Manager who built it, what it is, and where to install it.

Here's a simple MXI File to insert a 'JavaScript back button'. Note that this is only one of the three files needed to build an extension:


<macromedia-extension id="99999" name="JavaScript Back Button" version="1.0.0" type="Object"><products><product name="Dreamweaver" version="3" primary="true"/></products><author name="Danny Mather"/><description/><ui-access/><files><file name="javaback.html" destination="$dreamweaver/configuration/objects/invisibles"/><file name="javaback.gif" destination="$dreamweaver/configuration/objects/invisibles"/></files><configuration-changes/></macromedia-extension>

If you look between the '' tag you can see where it tells Extensions Manager where to install the HTML file within the Dreamweaver folder.


<!-- Created by Danny Mather, 12.05.2000, Object Name: Javascript Back Button:Text --><title>JavaScript Back Button</title><mce:script language="javascript"><!-- function objectTag() { // Return the html tag that should be inserted return '<a href="javascript:history.back();">' + document.forms[0].jback.value + ''; } // --></mce:script>

  Enter text for back button: