Search the archives!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Javascript] looping through nodeList
- From: apwebdesign at yahoo.com (Anthony Ettinger)
- Subject: [Javascript] looping through nodeList
- Date: Tue Oct 18 15:37:22 2005
--- Paul Novitski <paul@xxxxxxxxxxxxxxxxxxxx> wrote: > At 12:55 PM 10/18/2005, Anthony Ettinger wrote: > >window.onload=Name(); > > > >Needs to be without the ()'s: > > > >window.onload=Name; > > > >..which makes sense, since you wouldn't be passing > >parameters from anywhere on the initial routine > call. > > > The way I think of this: > > window.onload = DoSomething; > > is that the entire text of the function > DoSomething() is copied to > the window.onload "variable." If you then execute: > > alert(window.onload); > > you'll see the DoSomething() function script there > in its entirety. > > One interesting ramification of this (which I've > played with in other > languages but never in javascript) is the > feasibility of parsing and > modifying function code stored in a variable. For > example, a > function can edit a copy of itself and then call > this revised form of > itself. Nasty-fun wrinkle on recursion! Those > kinds of games can > produce program code that's incredibly difficult to > maintain, but > it's fun to play with nonetheless. > Haa...nice. Any input on this? I basically am rewriting mailto:, removing the non-working @. accessible, but doesn't work unless user changes the @ manually. I've seen the html entity solution, but seems rather easy to defeat to me. Would only have to convert entities back into symbols. ie - using . and @ Anthony Ettinger ph: (408) 656-2473 web: http://www.apwebdesign.com
- Follow-Ups:
- [Javascript] looping through nodeList
- From: Paul Novitski
- [Javascript] looping through nodeList
- References:
- [Javascript] looping through nodeList
- From: Paul Novitski
- [Javascript] looping through nodeList
- Prev by Date: [Javascript] looping through nodeList
- Next by Date: [Javascript] looping through nodeList
- Previous by thread: [Javascript] looping through nodeList
- Next by thread: [Javascript] looping through nodeList
- Index(es):