Don't use unsafeWindow. UnsafeWindow is bad in a variety of ways, and
it is almost *never* required. Just learn how to use the tools.
http://www.oreillynet.com/lpt/a/6257
Pitfall #3. You can use the method mentioned there, or use xpath to
find "//form['form1'=@name]".
This is not what I meant. The code posted under pitfall#3 uses
"namedItem". If you really want a handle to the input, this should work
too, but it seems a bit verbose.
Only if the element actually _has_ an ID of "text1". If it does then
yes, this is the most straightforward and universally good and sane way
to get a handle to the element. That's the point of the ID attribute.
Note that Windows Crapsplorer will return elements with _name_ of
"text1" if no element with _ID_ of "text1" exists.
Mozilla/Opera/Safari/anything decent does not. So you really need the
ID, not the name.