On Thu, 2003-06-12 at 12:10, Andrew Jorgensen wrote: > I looked at devedge.netscape.com but I couldn't find anything about > form.submit() and friends. JavaScript is a general programming language, > the reference for it refers to the general case.
That correct. You're actually using JavaScript to manipulate the DOM
(Document Object Model). I don't know of a good reference, but you would
search based on terms like DOM, javascript, DHTML, etc.
DHTML is cool as has come a long way. These days its even reasonably
portable. Some tips:
1) Avoid browser detection. These are inherently brittle and short
sighted. Instead, branch on functionality. For example:
if (document.getElementByID ) // <- Note lack of parens
{
// Code using document.getElementByID()
}
else if ( /* ugly IE function I always have to lookup */)
{
// DIE IE DIE!
}
else
{
// Non-dynamic alternative. You did remember one, right?
}
2) Test, test, test, test. It's tempting to test only in Mozilla because
its Javascript debugging tools are so much better. But don't forget to
occasionally pop into IE, Opera, or Konqueror. They're incomplete,
non-standard implementations can give funny results. At least two of
them are improving.
BTW: Submit onchange with selects can be disconcerting for non-sighted
users. If they might be among your target users, be sure to do
appropriate useability testing. (This really deserves to be another
post, but most people sadly don't care.)
--
Stuart Jansen <[EMAIL PROTECTED], AIM:StuartMJansen>
When in doubt, use brute force. -- Ken Thompson, co-creator of Unix
signature.asc
Description: This is a digitally signed message part
____________________ BYU Unix Users Group http://uug.byu.edu/ ___________________________________________________________________ List Info: http://uug.byu.edu/cgi-bin/mailman/listinfo/uug-list
