javascript - Problems with Extjs.getBody -


i have line of code

 var width_client = ext.getbody().getwidth(true); 

and ext.getbody() null. asume check doen before ext.getbody() becames not null, dont' know or change.

any idea how solve this?

i use extjs 4.0.7

you can access document.body when rendered. question made conclusion code located inside <head>. when code executed there no <body> rendered yet. have wrap code function , pass function ext.onready (or ext.ondocumentready) method:

ext.onready(function() {     alert(ext.getbody().getwidth(true)); }); 

here demo.


Comments

Popular posts from this blog

c# - SVN Error : "svnadmin: E205000: Too many arguments" -

c# - Copy ObservableCollection to another ObservableCollection -

All overlapping substrings matching a java regex -