View Full Version : Alternative for document.getElementbyID?

6 Aug 2012, 3:48 AM
Heya, folks. Another question:

I'm using a canvas for drawing some graphics within a container. There's no Ext Component for canvas, so I'm placing my canvas by using the html property of my container. So far, so good.

Now I need access to the dom element and tried the usual javascript way to do that: document.getElementbyId("mycanvas").

It doesn't matter, where or when I'm using this method, it returns null. (After Ext.onReady, within render or activate of my container or panel)

But I can't figure out what I'm doing wrong.

6 Aug 2012, 5:16 AM

may you provide your code for better understanding the problem

6 Aug 2012, 10:03 PM
Thanks for your reply, sword-it. I already found a solution for my problem. (Don't know why it always works out after getting frustrated and posting here)

For any others, that want to use canvas to draw graphics and stuff:

http://jsjoy.com/blog/62/ext-js-and-canvas-integration (http://jsjoy.com/blog/62/ext-js-and-canvas-integration)