ADDENDUM: javascript: DOM syntax for SPANS/DIVS ???

by "Phil Babcock" <pbabcock(at)bgsgroup.com>

 Date:  Wed, 24 Jan 2001 11:07:53 -0500
 To:  hwg-languages(at)hwg.org
 References:  felix
  todo: View Thread, Original
As an addendum to my previous post, I could also pass the NAME of the span=
 in question to the function.  Thing is, I can't seem to get JavaScript to=
 use the value in a string instead of the name of the string, like this:

onclick=3D"showspan('spanBinoculars')"


function showspan (strSpanName) {   
	strSpanName.style.visibility =3D 'visible'
}


But this doesn't result in

spanBinoculars.style.visibility =3D 'visible'

as I had hoped it would...  Any ideas?

phil.

HWG: hwg-languages mailing list archives, maintained by Webmasters @ IWA

This page is part of a preserved archive of archives.hwg.org. The site is no longer active and its content is not maintained. For enquiries about this archive, write to archive(at)iwanet.org.