Wednesday 22 October 2008

[ExtJs] Namespace example

=== html file ====
[!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd"]
[html lang="en"]
[head]
[meta http-equiv="content-type" content="text/html; charset=iso-8859-1"]
[title]namespace test page[/title]
[!-- Bring in the ExtJs Libraries and CSS --]
[link rel="stylesheet" type="text/css" href="../../resources/css/ext-all.css" /]
[script type="text/javascript" src="../../adapter/ext/ext-base.js"] [/script]
[script type="text/javascript" src="../../ext-all-debug.js"] [/script]
[!-- Place the page specific js here --]
[script type="text/javascript" src="applayout.js"] [/script]
[!-- End page specific js --]

[script type="text/javascript"]
Ext.onReady(myNameSpace.app.init, myNameSpace.app);
[/script]

[/head]
[body]


[/body]
[/html]


===== js file ====
Ext.BLANK_IMAGE_URL='../resources/images/default/s.gif';

Ext.namespace('myNameSpace');

Ext.namespace('myNameSpace2');

myNameSpace.app = function() {
return {
init:function(){
alert('application successfully initialized');
//this.testInit();
var aa = myNameSpace2.app.testIni('test value1');
alert(aa);
this.testInit(aa+" : 2");
},
testInit: function(getValue){
alert(getValue);
}
}
}();


myNameSpace2.app = function(){
return{
testIni:function(getValue) {
var ss = getValue;
return ss;
}
}
}();

7 comments:

Anonymous said...

[url=http://loveepicentre.com/advice.php][img]http://loveepicentre.com/uploades/photos/12.jpg[/img][/url]
dating websites with herpes [url=http://loveepicentre.com/articles.php]male dating profiles examples[/url] philpina dating in uk
sacramento asian dating site [url=http://loveepicentre.com/]dating in latrobe[/url] explicit dating sims
dating card [url=http://loveepicentre.com/articles.php]review adult dating site[/url] free online dating services shelley idaho

Anonymous said...

free irish crochet patterns ebook http://audiobookscollection.co.uk/fr/Inequality-and-Growth-Theory-and-Policy-Implications/p228380/ magyk ebook [url=http://audiobookscollection.co.uk/it/Writing-for-Video-Games/p171805/]ebook pdf atkinson lovegrove[/url] silent spring rachel carso ebook

Anonymous said...

Howdy outstanԁing websіte! Doeѕ running a blog similar to thiѕ tаke a large amount of worκ?
I hаve viгtually no κnowlеdge оf рrogгаmming
but I ωas hopіng to start my own blog ѕoοn.
Anyωay, should уou hаvе any suggestiоnѕ or teсhnіques for
new blog oωners please sharе. I know thіs
is οff topic hοweveг I just haԁ to aѕk.
Thank you!

my homеρage; how to find ppl on kik

Anonymous said...

I'm really enjoying the design and layout of your website. It'ѕ a very
eаsy on thе eуеs which mаkes it much more enjоyаble for mе to come hеrе аnd vіѕit more often.
Dіd you hiге out a develοpеr to creаte уοur
theme? Supегb ωork!

Also viѕit my pаge what is the best skin exfoliator

Anonymous said...

Wоw, that's what I was seeking for, what a data! existing here at this blog, thanks admin of this web page.

Here is my blog post; persian dating site

Anonymous said...

Ι all the time usеd to study piece of ωrіting in nеws paperѕ but now аs I аm
a usеr of іntеrnеt so frοm now Ι am uѕing net fοr posts, thanks to web.



Hеre iѕ my sіte: article submitter

Anonymous said...

Ηi there, I reаd your blоg regularly. Your ωriting stylе іѕ aωesomе, keep it
up!

My web blοg; http://www.wikigreen.eu