Dynamic onClick event
Hello all. I have an IMG object in my page...
<IMG name="tstgray" src="" onMouseOver="mover();">
during the Mover() function, I want to take the "onMouseOver" event trigger
off of the IMG object and put an "onClick" trigger on it to point to a
function name I determine at runtime. I have tried things like...
document.all.tstgray.onClick = "window.alert('worked')";
document.all.tstgray.onMouseOver = "";
....just to test it, but to no avail. It appears as though it isn't possible
to read (or write) these values during runtime. I'm pretty new to this, so
perhaps I am doing this wrong? I did a search on the internet, and I saw
someone else had the same issue. A supposed solution was posted, but it was
by someone who spoke broken English. It left me more confused than when I
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL