I am having a hard time with events (particularly click events) and ASP.NET.
So I have decided to put together the following code:
<html>
<head>
<script language="JavaScript">
function NodeClick()
{
var src = event.srcElement;
}
</script>
<LINK REL="stylesheet" TYPE="text/css" HREF="toc.css" />
</head>
<body>
<iNewsControl:TreeView id="NRCSTreeView1" System="iNewsSystem"
Directory="." runat=server/>
.....
In the custom "TreeView" control I emit the following code:
// Add the <IMG> control to the list
Controls.Add(new LiteralControl("<IMG
onclick=\"NodeClick()\" WIDTH=\"16\" SRC=\"images/bs.gif\"/>"));
Yet when I click on the image the "NodeClick" function does not seem to be
called. I have put a breakpoint and put an "alert" in the handler and both
indicate that the function is not being called. Why doesn't the page
generated by ASP.NET accept this JavaScript code?
Thank you.
Kevin Burton
kevin.burton@i...