|
using
layer1 as the inline div's id is confusing to the browser. call it
layer1Div.
Here's the way it should look
Jon
<html>
<head> <title>DynAPI Distribution: Inline Layers Example</title> <script language="JavaScript" src="./src/dynapi.js"></script> <script language="Javascript"> DynAPI.setLibraryPath('./src/lib/') DynAPI.include('dynapi.api.*') DynAPI.include('dynapi.ext.inline.js') </script> <script language="Javascript"> DynAPI. { layer1 = this.document.all['layer1Div'] // NOTE THE REMOVED 'var' and the name of the layer being changed to 'layer1Div' layer1.moveTo(100,100) layer1.setBgColor('#F8F8F8') layer1.setVisible(true) var myevent1 = new EventListener(this.document) myevent1. { alert('Click') } layer1.addEventListener(myevent1) } </script> </head> <body> <div id="layer1Div" style="position:absolute; visibility:hidden">This is a test</div> <!-- ******** how can I get this href to work ***************--> <a href="javascript:layer1.setBgColor('red')">Change Color</a> </body> </html>
|
- [Dynapi-Help] question for new user Greg Jacobson
- Re: [Dynapi-Help] question for new user Richard Bennett
- Re: [Dynapi-Help] question for new user Doug Melvin
- RE: [Dynapi-Help] question for new user Jon McLennan
- RE: [Dynapi-Help] question for new user Darryl Cousins
- RE: [Dynapi-Help] question for new user Pascal Bestebroer
- RE: [Dynapi-Help] question for new user martin str�m
- RE: [Dynapi-Help] question for new user Greg Jacobson
- RE: [Dynapi-Help] question for new user Pascal
