Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: SOLVED: Help with viewport or other thing, in IE7

  1. #1
    Sencha User dias's Avatar
    Join Date
    Feb 2008
    Location
    Portugal
    Posts
    96

    Default SOLVED: Help with viewport or other thing, in IE7

    Hello,

    i have this code

    Code:
    Ext.BLANK_IMAGE_URL = './javascript/extjs3/resources/images/default/s.gif';
    
    Ext.onReady(function(){
    var wizardContainer = new Ext.Panel({
      id: 'wizardContainer'
      ,name: 'wizardContainer'
      ,region:'center'
      ,margins:'0 0 0 0'
      ,layout:'border'
      ,autoScroll:false
      ,border:false
      ,width: '100%'
      ,height: '100%'
      ,bodyStyle: 'background: none'
      ,items: [{
           region: 'center'
          ,border: false
          ,bodyStyle: 'background: none'
      }]
    });
    
    var viewport = new Ext.Viewport({
       layout:'border'
       ,cls : 'viewport'
       ,hideMode: 'offsets'
      ,items:[wizardContainer]
    });
    }
    this css:

    Code:
    .viewport {
       background-color: #ffffff;
       background-image: url(../images/pints1.png) no-repeat;
    }

    I use ExtJS3RC1.1, in IE8 and FF3.0.10 works fine.

    But in IE7 this error:

    "Expected identifier, string or number (http://ldaptest.ipcb.pt/newsite/,147)"

    How can i know here is the error... can someone help me...


    Thanks in advance

    Paulo Dias
    Portugal
    Castelo Branco

  2. #2
    Sencha User conorarmstrong's Avatar
    Join Date
    Mar 2008
    Location
    Northern Ireland
    Posts
    224

    Default

    doubt that it's it but there's an error in the last line of your code (I've put it in red):

    Quote Originally Posted by dias View Post
    Hello,

    i have this code

    Code:
    Ext.BLANK_IMAGE_URL = './javascript/extjs3/resources/images/default/s.gif';
    
    Ext.onReady(function(){
    var wizardContainer = new Ext.Panel({
      id: 'wizardContainer'
      ,name: 'wizardContainer'
      ,region:'center'
      ,margins:'0 0 0 0'
      ,layout:'border'
      ,autoScroll:false
      ,border:false
      ,width: '100%'
      ,height: '100%'
      ,bodyStyle: 'background: none'
      ,items: [{
           region: 'center'
          ,border: false
          ,bodyStyle: 'background: none'
      }]
    });
    
    var viewport = new Ext.Viewport({
       layout:'border'
       ,cls : 'viewport'
       ,hideMode: 'offsets'
      ,items:[wizardContainer]
    });
    });
    ------------------------------------------
    Conor Armstrong
    tw: @evathedog
    web: rockstown.com

    Ext.ux.form.AutoCombo
    Ext.ux.SimpleIFrame
    Ext.ux.form.ToolFieldSet

    Knowledge is realising that the street is one-way, wisdom is looking both directions anyway.

  3. #3
    Sencha User dias's Avatar
    Join Date
    Feb 2008
    Location
    Portugal
    Posts
    96

    Default

    Ok...

    But, what is the error, and how i correct it...


    Paulo Dias
    Portugal
    Castelo Branco

  4. #4
    Sencha User
    Join Date
    Mar 2007
    Posts
    7,854

    Default

    Should be obvious if you run your code thru jslint.

  5. #5
    Sencha User Animal's Avatar
    Join Date
    Mar 2007
    Location
    Bédoin/Nottingham
    Posts
    30,892

    Default

    Overnested.

    A border layout Panel inside the border layout Viewport!

  6. #6
    Sencha User dias's Avatar
    Join Date
    Feb 2008
    Location
    Portugal
    Posts
    96

    Default

    Ok, but can you explain me how to test the code in jslint!


    Thanks

    Paulo Dias
    Portugal
    Castelo Branco

  7. #7
    Sencha User conorarmstrong's Avatar
    Join Date
    Mar 2008
    Location
    Northern Ireland
    Posts
    224

    Default

    Both viewport and wizardContainer have border layouts - is that intentional?

    Also, the item you have included in wizardContainer doesn't do (display) anything.

    Code amended slightly to produce an output below:

    Code:
    Ext.onReady(function(){
            var wizardContainer = new Ext.Panel({
                    id: 'wizardContainer'
                    ,name: 'wizardContainer'
                    ,region:'center'
                    ,margins:'0 0 0 0'
            //      ,layout:'border'
                    ,autoScroll:false
                    ,border:false
                    ,width: '100%'
                    ,height: '100%'
                    ,bodyStyle: 'background: none'
                    ,html: 'Blah Blah'
            /*      ,items: [{
                                     region: 'center'
                                    ,border: false
                                    ,bodyStyle: 'background: none'
                    }]*/
            });
    
            var viewport = new Ext.Viewport({
                     layout:'border'
                     ,cls : 'viewport'
                     ,hideMode: 'offsets'
                    ,items:[wizardContainer]
            });
    });
    ------------------------------------------
    Conor Armstrong
    tw: @evathedog
    web: rockstown.com

    Ext.ux.form.AutoCombo
    Ext.ux.SimpleIFrame
    Ext.ux.form.ToolFieldSet

    Knowledge is realising that the street is one-way, wisdom is looking both directions anyway.

  8. #8
    Sencha User dias's Avatar
    Join Date
    Feb 2008
    Location
    Portugal
    Posts
    96

    Default

    Animal,


    Sorry, but what do you mean whit "overnested"...


    Thanks,

    Paulo Dias
    Portugal
    Castelo Branco

  9. #9
    Sencha User conorarmstrong's Avatar
    Join Date
    Mar 2008
    Location
    Northern Ireland
    Posts
    224

    Default

    overnested - having components inside redundant (usually) panels which could be done away with.
    ------------------------------------------
    Conor Armstrong
    tw: @evathedog
    web: rockstown.com

    Ext.ux.form.AutoCombo
    Ext.ux.SimpleIFrame
    Ext.ux.form.ToolFieldSet

    Knowledge is realising that the street is one-way, wisdom is looking both directions anyway.

  10. #10
    Sencha User dias's Avatar
    Join Date
    Feb 2008
    Location
    Portugal
    Posts
    96

    Default

    Ok... and thanks for the language lesson.

    i try the corrected code,

    but in IE7 the same error:

    "Expected identifier, string or number (http://ldaptest.ipcb.pt/newsite/,147)"


    Thanks

    Paulo
    Portugal
    Castelo Branco

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •