hwg-techniques archives | Oct 2000 | new search | results | previous | next |
Passing div object id's to functionsby "John Murray" <jmnc(at)lis.net.au> |
|
I know I'm missing something simple, and probably being lazy, but I start from the perspective that the guys who set up DHTML would know we would want to do this. ##################### <html> <head> <style> .thedivs { color:"#ffffff"; } </style> <script type="text/javascript"> var divid; function alertthez(divid){ alert(divid.style.zIndex); } </script> <body> <div id="fred" style="color:"#333333" onClick="alertthez('fred');"> blah blah </div> </body> </html> ################### yet it falls over with "style.zIndex is not an object" It is so fundamentally necessary that there must be some syntax to pass the id value into the function. What am I mising? John
HWG hwg-techniques mailing list archives, maintained by Webmasters @ IWA