[Javascript]Passive,Javascript-callable,in-line(PHP)codereferences wit

David Lovering dlovering at gazos.com
Wed Apr 9 15:32:28 CDT 2003


<snip>

  cute -- I never imagined using an alert in combination with a href
declaration to float non-JavaScript code in an IFRAME...  [probably has
length limits though --- the garbage collection routine for alert is pretty
anemic].

  Much salivating to follow.

  About the only quibble I'd care to levy is that in the newest DOM RFC's
the 'id' is being touted as the definitive
identifier over that of 'name'.  Admittedly, the NetScape/Mozilla crowd has
pretty much gone the other way.
As I generally use both name and id on everything (and ALWAYS the same for
each!), I've never gotten burned.

  I've found you can do event handling inside frames, iframes and the
like -- but you have to be exceedingly careful as to where you reference the
handling scripts, etc.  The scripts I'm working on right now have a bunch of
conventional frames, one of which has a whole slew of iframes, each of which
has its own document with multiple embedded forms.  As I try to build around
reuseable modules wherever possible, I redirect everything to a standard
library which is invoked at the parent window level.  Boy, do those DOM
references get long and ugly!  ... But it works like a champ!
I can fireEvents all through the down-referenced code, and even (where
necessary) to some of the up-referenced code as well.  I'm sure the syntax
Nazi's would shit bricks if they saw how convoluted all these references
are, but it seems to
be the only way to make it happen.

-- Dave Lovering




More information about the Javascript mailing list