I agree that the problem appears to be mostly caused by the use of the
name attribute instead of the id attribute. While there are some
elements where it is still useful to specify the name attribute, if you
wish to be able to access an element individually, you need to specify
the id attribute, I usually specify an id for every element. Without an
id attribute, you can't use getElementById which makes life much more
challenging. 

Also I would recommend putting all the javascript in the <head> portion
of the HTML and then running it with an init() function that is called
from the onload attribute of the <body>. So you would have something
like this:
<html>
 <head>
  <script>
    function foo()
   {
    // foo's contents
    }
   function bar()
   {
    // bar's contents
   }
   function init()
   {
    foo();
    bar();
   }
  </script>
 </head>
 <body onload="init();">
 </body>
</html>

While there are times when javascript needs to be in the body of the
document, most of the time it should be in the head section. This is
where most people will look for it, and I think it makes it easier to
maintain if all of your javascript is in one section.

Joe Lee

>>> WaldenL@xxxxxxxxxxxxxxx 11/08/2004 09:13:24 >>>
Rob,

First, I can get the SESSION stuff to work, but only if I place the
scripts at the end of the document. I'll bet that NS doesn't support
the
defer=defer option on the script tag. Move the scripts to the end. 

Second, there is no element with an ID of "...BUTTON..." but there are
elements with a NAME of "...BUTTON...". So you need to use the
getElementsByName function. However, that function returns an array so
you need to deference the first element (Note, it's a plural Elements).


document.getElementsByName(buttons2)[0].value=newText;

Seems to work in both IE and NS. I'm sure this is also the problem
placing your value into AFIELD.007-01 since that's a NAME, not an ID. 

As for the HR, I can get rid of it visually, but I can't get the space
back. This will get rid of it visually when placed at the start of
your
JS:

var nHR = document.getElementsByTagName("HR")[0];
var nHRParent = nHR.parentNode;
nHRParent.removeChild(nHR); 

-Walden

------------
Walden H Leverich III
President & CEO
Tech Software
(516) 627-3800 x11
WaldenL@xxxxxxxxxxxxxxx 
http://www.TechSoftInc.com 

Quiquid latine dictum sit altum viditur.
(Whatever is said in Latin seems profound.)
 

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.