Hi there, I got this annoying problem...
I have to create dynamically an image control that has got to be accesses later through javascript.
In other words, I got an image that was created in the page code, and using javascript I got to be able to work with it
The image ID of a previously created image is uxTimerImage, and I've tried accessing it with the following code:
uxTimerImage = new Image();
uxTimerImage.ID = "uxTimerImage";
...
this.Controls.Add(uxTimerImage);
ClientScript.RegisterClientScriptBlock(this.GetType(),"timer",
"var timerObject1 = document.getElementById('" + uxTimerImage.ID + "');"+
"var timerObject2 = document.getElementById('<%= uxTimerImage.ClientID %>');"+
"var timerObject3 = document.getElementById('uxTimerImage');",
true);
The problem is that all those 3 examples return to me a null object, as if my object is nowhere to be found =\
(I don't think it affects the problem, but all this is done inside a content panel that belongs to a master page)
Any kind of help would be greatly appreciated