I have html template
<ul>
<li><a id="Dashboard1" href="" class="waves-effect">Version 1</a>
</li>
<li><a id="Dashboard2" href="" class="waves-effect">Version 2</a>
</li>
</ul>
i drop on form one TWebHTMLAnchor and bind to element Dashboard1.
OnClick event simple Showmessage (ancDashboard1Click event)
On WebFormCreate event i write next code
document.getElementById('Dashboard2').addEventListener('click',@ancDashboard1Click);
try to bind event from first control to second
if i click on first control, all fine, message dialog
if i click on second link, message show to but application reload after click ok in message dialog.
why different behavior?