Ext experts: quick question on window and style

Discussion in 'Javascript' started by DL, Jul 1, 2009.

  1. DL

    DL Guest

    Question/Problem:
    How to use the bodyStyle attribute?

    // Ext 2

    var ewin = new Ext.Window ({
    // x:200,
    // y:200,
    width:350,
    height:350,
    border:true,
    resizable:true,
    // try 1
    // bodyStyle: [{background-color:white; color:black; padding-left:
    10px}]

    // try 2
    // bodyStyle: [{background-color:'white', color:'black', padding-
    left:10px}]

    });

    // results
    neither try 1 nor try 2 worked in IE7 nor Firefox 3.0.11 on XP SP3.

    How to?

    Also, when I include the x and y attributes, the window failed to be
    opened, weird.

    Thanks.
     
    DL, Jul 1, 2009
    #1
    1. Advertising

  2. DL wrote:
    > Question/Problem:
    > How to use the bodyStyle attribute?


    You are looking for <http://extjs.com/support>. Delusions of "lightweight,
    high-performance cross-browser JavaScript [libraries]" that weigh at least
    "25kb" "(minified/gzipped)"(!) but are considered "Highly portable" by their
    authors nevertheless, are not supported here.


    PointedEars
     
    Thomas 'PointedEars' Lahn, Jul 1, 2009
    #2
    1. Advertising

  3. DL

    Don84 Guest

    On Jul 1, 11:27 am, Thomas 'PointedEars' Lahn <>
    wrote:
    > DL wrote:
    > > Question/Problem:
    > > How to use the bodyStyle attribute?

    >
    > You are looking for <http://extjs.com/support>.  Delusions of "lightweight,
    > high-performance cross-browser JavaScript [libraries]" that weigh at least
    > "25kb" "(minified/gzipped)"(!) but are considered "Highly portable" by their
    > authors nevertheless, are not supported here.
    >
    > PointedEars


    I've solved it.
    items: [{bodyStyle: "background-color:white; color:black; padding-left:
    10px"}]

    Yes, will attempt to use extjs forum, previous question was answered
    there, discouraging.
     
    Don84, Jul 1, 2009
    #3
  4. Don84 wrote:
    > Thomas 'PointedEars' Lahn wrote:
    >> DL wrote:
    >>> Question/Problem:
    >>> How to use the bodyStyle attribute?

    >> You are looking for <http://extjs.com/support>. Delusions of "lightweight,
    >> high-performance cross-browser JavaScript [libraries]" that weigh at least
    >> "25kb" "(minified/gzipped)"(!) but are considered "Highly portable" by their
    >> authors nevertheless, are not supported here.
    >> [...]


    Learn to quote. <http://jibbering.com/faq/#posting>

    > I've solved it.
    > items: [{bodyStyle: "background-color:white; color:black; padding-left:
    > 10px"}]
    >
    > Yes, will attempt to use extjs forum, previous question was answered
    > there, discouraging.


    It stands to reason that people who wrote junk like the following are eager
    to promote it. Even more those script-kiddies who decided using it.

    ,-<http://ajax.googleapis.com/ajax/libs/ext-core/3.0.0/ext-core-debug.js>
    |

    /*
    * Ext Core Library 3.0
    * http://extjs.com/
    * Copyright(c) 2006-2009, Ext JS, LLC.
    *
    * MIT Licensed - http://extjs.com/license/mit.txt
    *
    */


    // for old browsers
    window.undefined = window.undefined;



    Ext = {

    version: '3.0'
    };


    Ext.apply = function(o, c, defaults){
    // no "this" reference for friendly out of scope calls
    if(defaults){
    Ext.apply(o, defaults);
    }
    if(o && c && typeof c == 'object'){
    for(var p in c){
    o[p] = c[p];
    }
    }
    return o;
    };

    (function(){
    var idSeed = 0,
    ua = navigator.userAgent.toLowerCase(),
    check = function(r){
    return r.test(ua);
    },
    isStrict = document.compatMode == "CSS1Compat",
    isOpera = check(/opera/),
    isChrome = check(/chrome/),
    isWebKit = check(/webkit/),
    isSafari = !isChrome && check(/safari/),
    isSafari3 = isSafari && check(/version\/3/),
    isSafari4 = isSafari && check(/version\/4/),
    isIE = !isOpera && check(/msie/),
    isIE7 = isIE && check(/msie 7/),
    isIE8 = isIE && check(/msie 8/),
    isIE6 = isIE && !isIE7 && !isIE8,
    isGecko = !isWebKit && check(/gecko/),
    isGecko3 = isGecko && check(/rv:1\.9/),
    isBorderBox = isIE && !isStrict,
    isWindows = check(/windows|win32/),
    isMac = check(/macintosh|mac os x/),
    isAir = check(/adobeair/),
    isLinux = check(/linux/),
    isSecure = /^https/i.test(window.location.protocol);

    // remove css image flicker
    if(isIE6){
    try{
    document.execCommand("BackgroundImageCache", false, true);
    }catch(e){}
    }

    // ...


    PointedEars
     
    Thomas 'PointedEars' Lahn, Jul 2, 2009
    #4
  5. DL

    David Mark Guest

    On Jul 1, 11:27 am, Thomas 'PointedEars' Lahn <>
    wrote:
    > DL wrote:
    > > Question/Problem:
    > > How to use the bodyStyle attribute?

    >
    > You are looking for <http://extjs.com/support>.  Delusions of "lightweight,
    > high-performance cross-browser JavaScript [libraries]" that weigh at least
    > "25kb" "(minified/gzipped)"(!) but are considered "Highly portable" by their
    > authors nevertheless, are not supported here.


    LOL. That rules out lightweight (and I wonder what you get for your
    80K.) High-performance seems unlikely and is Ext really cross-browser
    (seems doubtful?) I'm inclined to bet that searching the script(s)
    for userAgent will put that to rest.
     
    David Mark, Jul 2, 2009
    #5
  6. DL

    David Mark Guest

    On Jul 2, 6:09 am, Thomas 'PointedEars' Lahn <>
    wrote:
    > Don84 wrote:
    > > Thomas 'PointedEars' Lahn wrote:
    > >> DL wrote:
    > >>> Question/Problem:
    > >>> How to use the bodyStyle attribute?
    > >> You are looking for <http://extjs.com/support>.  Delusions of "lightweight,
    > >> high-performance cross-browser JavaScript [libraries]" that weigh at least
    > >> "25kb" "(minified/gzipped)"(!) but are considered "Highly portable" bytheir
    > >> authors nevertheless, are not supported here.
    > >> [...]

    >
    > Learn to quote.  <http://jibbering.com/faq/#posting>
    >
    > > I've solved it.
    > > items: [{bodyStyle: "background-color:white; color:black; padding-left:
    > > 10px"}]

    >
    > > Yes, will attempt to use extjs forum, previous question was answered
    > > there, discouraging.

    >
    > It stands to reason that people who wrote junk like the following are eager
    > to promote it.  Even more those script-kiddies who decided using it.
    >
    > ,-<http://ajax.googleapis.com/ajax/libs/ext-core/3.0.0/ext-core-debug.js>
    > |
    >
    > /*
    >  * Ext Core Library 3.0
    >  *http://extjs.com/
    >  * Copyright(c) 2006-2009, Ext JS, LLC.
    >  *
    >  * MIT Licensed -http://extjs.com/license/mit.txt
    >  *
    >  */
    >
    > // for old browsers
    > window.undefined = window.undefined;


    First line. Now that's a record. Continuing anyway.

    >
    > Ext = {
    >
    >     version: '3.0'
    >
    > };


    Doesn't look like a constructor to me.

    >
    > Ext.apply = function(o, c, defaults){
    >     // no "this" reference for friendly out of scope calls


    Out of scope? How about out of touch with reality?

    >     if(defaults){
    >         Ext.apply(o, defaults);
    >     }
    >     if(o && c && typeof c == 'object'){


    Should not test o.

    >         for(var p in c){


    Ahem. So much for common sense.

    >             o[p] = c[p];
    >         }
    >     }
    >     return o;
    >
    > };
    >
    > (function(){
    >     var idSeed = 0,
    >         ua = navigator.userAgent.toLowerCase(),


    I kmew it. So much for cross-browser.

    >         check = function(r){
    >             return r.test(ua);
    >         },


    A complete waste. Clearly trying to squeeze a few extra bytes out of
    the minified version.

    >         isStrict = document.compatMode == "CSS1Compat",


    What is meant to be inferred from *that*? Is IE < 6 considered
    "strict."

    >         isOpera = check(/opera/),
    >         isChrome = check(/chrome/),
    >         isWebKit = check(/webkit/),
    >         isSafari = !isChrome && check(/safari/),
    >         isSafari3 = isSafari && check(/version\/3/),
    >         isSafari4 = isSafari && check(/version\/4/),
    >         isIE = !isOpera && check(/msie/),


    LOL.

    >         isIE7 = isIE && check(/msie 7/),
    >         isIE8 = isIE && check(/msie 8/),
    >         isIE6 = isIE && !isIE7 && !isIE8,
    >         isGecko = !isWebKit && check(/gecko/),
    >         isGecko3 = isGecko && check(/rv:1\.9/),


    You've got to wonder why they need all of these flags.

    >         isBorderBox = isIE && !isStrict,


    See above. Should never need or want such a flag anyway.

    >         isWindows = check(/windows|win32/),
    >         isMac = check(/macintosh|mac os x/),
    >         isAir = check(/adobeair/),
    >         isLinux = check(/linux/),
    >         isSecure = /^https/i.test(window.location.protocol);
    >
    >     // remove css image flicker


    Never bothered me.

    >     if(isIE6){
    >         try{


    Is this known to throw exceptions in IE6? How about agents with
    confusing IE-like UA strings that also lack the execCommand method?

    >             document.execCommand("BackgroundImageCache", false, true);
    >         }catch(e){}
    >     }
    >
    > // ...


    So they were all DOA. Only difference is people paid for this one.
     
    David Mark, Jul 2, 2009
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Christopher Benson-Manica

    Quick cast style question

    Christopher Benson-Manica, Apr 30, 2004, in forum: C++
    Replies:
    15
    Views:
    544
    Jake Montgomery
    May 4, 2004
  2. JKop
    Replies:
    11
    Views:
    938
  3. Jindal, Pankaj

    ['ext.IsDOMString', 'ext.SplitQName']

    Jindal, Pankaj, Dec 22, 2004, in forum: Python
    Replies:
    0
    Views:
    341
    Jindal, Pankaj
    Dec 22, 2004
  4. Replies:
    11
    Views:
    625
  5. Ken Varn
    Replies:
    0
    Views:
    538
    Ken Varn
    Apr 26, 2004
Loading...

Share This Page