View Full Version : Namespace and hidden HTML tags

6 Oct 2010, 1:45 AM
Hello to all,

I am really new to EXTJS and I have a very basic problem.
I have read that is god to use namespace and this is what I did.
I want on the other hand to use some hidden variables from the HTML that launches my Javascript code.

It seems that with the EXT.get(...) this is not possible because I am under a namespace.
Please correct me if I am wrong.

Thus I have found a way aroudn this by simply using document.getEementById but I know that this is not the best way.
Could you please explain me how to do this ?

Thank you in advance

6 Oct 2010, 1:54 AM
Ext.get() uses document.getElementById, so they should behave identical!

6 Oct 2010, 2:00 AM
Hello Condor thank you for the quick reply.

I am using this skeleton that I have found at the tutorials:


test.app = function()
return {
init : function(){ // Privileged method. Can be called from outside


Ext.onReady(test.app.init, test.app);

When I use Ext.get that points to a hidden tag it returns undefined but when I do document.getElementById it works.
I have tried the Ext.get with a simpler script no namespace and it worked as well so I thought that the problem coudl be somewhere there.

Thank you