[thelist] Top 10 JavaScripts

Diane Soini dianesoini at earthlink.net
Fri Oct 17 20:45:57 CDT 2003


If they aren't able to learn it, what is wrong, then, with the ones 
that come in Dreamweaver? They are bloated for sure, but they've 
thought out pretty well how to get them to work in most browsers most 
of the time. Plus they seem to have included the ones that would 
probably qualify as in the top 10. Many of these scripts have comments 
in them that tell you what to do to make them work. Which, despite what 
some people might say, can help people to begin to learn javascript, or 
at least invite the curious to experiment.

So, perhaps you could pick some of the Dreamweaver scripts and teach 
them how to use them. Or maybe you could go through the Dreamweaver 
scripts and then find similar scripts online and do a lesson in 
comparison.

But of course you want an answer to your question, so here's mine:
First of all, I've never met a script I can just plug and play without 
doing some kind of edit to it. But the scripts I need to know most 
often are:
1. Scripts that open popup windows. Need to know all the browser chrome 
and other settings you can configure in the third argument of 
window.open(), plus you need to know that it returns an object, so you 
need to know to make void if used in the href attribute.
2. Scripts that change the parent window after a popup window has 
opened. That would be window.opener scripts.
3. Scripts that toggle visibility of divs or layers or whatever. Along 
with the accompanying various ways to get a handle on the object you 
are trying to show/hide.
4. Scripts for validating forms. This can get a bit complicated. 
Dreamweaver can handle that pretty well, so maybe it's best for your 
needs to stick with that. To be honest, form validation with javascript 
is beyond me.
5. Scripts for doing mouseover image effects.
6. Not technically a script, but I think it's important to know how to 
debug a script using alert();
7. Document write scripts. It's good to know how to do that.
8. Scripts that do stuff to other frames. If you are teaching frames. 
(Please no arguments about frames -- if you are learning HTML it's good 
to know frames. Better to know everything and not use it than know very 
little and not be able to use it if needed.)

Well, that's probably enough. After this I start thinking of 
complicated things.

Most important is to let the students know that most things they come 
across are not going to work if the only browser they ever test them 
out is Windows Internet Explorer. I have tried and tried to no avail to 
teach some of my colleagues at work this basic fact. Just because it 
worked for you on your PC in IE does not mean it will work for 
everybody. It's all about testing and fixing bugs. In fact, if you 
teach nothing more than how to test and debug and look up solutions on 
the Internet, that will get them very very far.

D


On Friday, October 17, 2003, at 03:11 AM, 
thelist-request at lists.evolt.org wrote:

> The intention is not to teach these students JavaScript - they are =
> incapable of it. Getting them to do anything in code (as opposed to 
> the =
> menus of Dreamweaver) is a minor miracle.=20



More information about the thelist mailing list