Layer: On Content Change Event : Layer Events « Ajax Layer « JavaScript DHTML






Layer: On Content Change Event


http://dynapi.sourceforge.net/
GNU LESSER GENERAL PUBLIC LICENSE
Version 2.1, February 1999
<html>
<head>
<title>DynAPI Examples - On Content Change Event</title>
<script language="Javascript" src="./dynapisrc/dynapi.js"></script>
<script language="Javascript">
<!--
  dynapi.library.setPath('./dynapisrc/');
  dynapi.library.include('dynapi.api');
//-->
</script>
<script language="Javascript">
<!--
dynapi.onLoad(function() {
  lyr = new DynLayer('Hello',300,50,100,100,'yellow');
  lyr.addEventListener ({
    oncontentchange : function(e) {
      var me = e.getSource();
      alert('Content Change to : "'+me.getHTML()+'"');
    }
  });

  dynapi.document.addChild(lyr);
});

//-->
</script>
</head>

<body bgcolor="#FFFFFF">
<table bgcolor="#ffffff" border=0><tr><td>

<br>Conten #1: <a href="javascript:lyr.setHTML('Cool Layer')">Cool Layer</a>
<br>Conten #2: <a href="javascript:lyr.setHTML('Blueprint - Layers in overdrive!')">Blueprint - Layers in overdrive!</a>
<br>Conten #3: <a href="javascript:lyr.setHTML('DynAPI is ccool!')">DynAPI is ccool!</a>
</td></tr></table>
</body>
</html>

           
       








dynapi.zip( 791 k)

Related examples in the same category

1.Layer: On Location Change Event
2.Relative Layers : Events example
3.Subclassing events