View Full Version : SOLVED: Help with viewport or other thing, in IE7
Hello,
i have this 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:
.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
conorarmstrong
28 May 2009, 3:57 AM
doubt that it's it but there's an error in the last line of your code (I've put it in red):
Hello,
i have this 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]
});
});
Ok...
But, what is the error, and how i correct it... :)
Paulo Dias
tryanDLS
28 May 2009, 6:47 AM
Should be obvious if you run your code thru jslint.
Animal
28 May 2009, 6:49 AM
Overnested.
A border layout Panel inside the border layout Viewport!
Ok, but can you explain me how to test the code in jslint!
Thanks
Paulo Dias
conorarmstrong
28 May 2009, 7:02 AM
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:
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]
});
});
Animal,
Sorry, but what do you mean whit "overnested"...
Thanks,
Paulo Dias
conorarmstrong
28 May 2009, 7:13 AM
overnested - having components inside redundant (usually) panels which could be done away with.
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
conorarmstrong
28 May 2009, 7:21 AM
works fine in mine - v7.0.6001.18000
In 7.0.5730.13... the same error.
conorarmstrong
28 May 2009, 8:18 AM
just to clarify, are you saying the following script errors for you (you'll need to fix the path names for ext):
<html>
<head>
<link rel="stylesheet" type="text/css" href="./lib/ext/resources/css/ext-all.css">
<script type="text/javascript" src="./lib/ext/adapter/ext/ext-base.js"></script>
<script type="text/javascript" src="./lib/ext/ext-all-debug.js"></script>
<STYLE TYPE="text/css" MEDIA=screen>
<!--
.viewport {
background-color: #ffffff;
background-image: url(../images/pints1.png) no-repeat;
}
-->
</STYLE>
</head>
<body>
<script>
Ext.BLANK_IMAGE_URL = 'lib/ext/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'
,html: 'Blah Blah'
/* ,items: [{
region: 'center'
,border: false
,bodyStyle: 'background: none'
}]*/
});
var viewport = new Ext.Viewport({
layout:'border'
,cls : 'viewport'
,hideMode: 'offsets'
,items:[wizardContainer]
});
});
</script>
</body>
</html>
I have solved the problem, it is a bug in a plugin i use. The code you post works FINE.
Thanks for your help.
Paulo Dias
Powered by vBulletin® Version 4.2.3 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.