-
19 Feb 2007 12:20 PM #1
Do not set body.innerHTML='' if scripts are loaded in body
Do not set body.innerHTML='' if scripts are loaded in body
If I move all the scripts into the head all is well.
All is well in netscape and firefox as is.
Problem is most of the css is lost in IE and Opera.
Oh, let me double check that this works on the .40 release.Code:<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Untitled Document</title> </head> <body> <link rel='stylesheet' type='text/css' href='ext/resources/css/ext-all.css' /> <script type='text/javascript' src='ext/yui-utilities.js'></script> <script type='text/javascript' src='ext/ext-all.js'></script> <script type='text/javascript' src='ext/ext-bridge-yui.js'></script> <script type='text/javascript'> Main = function(){ var layout; return{ Init:function(){ document.body.innerHTML=''; layout = new Ext.BorderLayout(document.body,{ north:{ initialSize: 50 }, west:{ split: true, initialSize: 150, minSize: 100, maxSize: 300, titlebar: true, animate: true }, center:{ tabPosition: 'top', closeOnTab: true, alwaysShowTabs: true, resizeTabs: true } }); layout.beginUpdate(); layout.add('north', new Ext.ContentPanel('header',{autoCreate:true})); layout.add('west', new Ext.ContentPanel('menu',{autoCreate:true, title:'Menu'})); layout.add('center', new Ext.ContentPanel('home',{autoCreate:true, title:'Home'})); layout.endUpdate(); } } }(); Ext.onReady(Main.Init); </script> </body> </html>
EDIT:
Was wrong this isn't working in .40 release...
-
19 Feb 2007 12:26 PM #2Sencha - Community Support Team
- Join Date
- Mar 2007
- Location
- Forest Grove, OR
- Posts
- 1,038
- Vote Rating
- 0
It probably should fail as you're trying to reference tags (script and style) that may only be placed in the head in a document with a strict doctype.
-
19 Feb 2007 12:30 PM #3
Does the strict DTD enforce putting script in the head tag only?
Tim Ryan
Read BEFORE posting a question / BEFORE posting a Bug
Use Google to Search - API / Forum
API Doc (4.x | 3.x | 2.x | 1.x) / FAQ / 1.x->2.x Migration Guide / 2.x->3.x Migration Guide
-
19 Feb 2007 12:37 PM #4
I removed the document strict line at the top.... Same result.
I also tried it with
Code:<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/loose.dtd">
-
19 Feb 2007 12:51 PM #5
document.body.innerHTML='';
document.body.innerHTML='';
The problem is:
I guess IE and Opera must wipe out the script files that were loaded into the body.Code:document.body.innerHTML='';
Firefox does not.
Well it has nothing to do with alpha 1.0...
But for future reference don't erase the body if you are putting scripts in it.
Similar Threads
-
[1.0a3r4]Transformed <select> gets moved before</body&
By mystix in forum Ext 2.x: Help & DiscussionReplies: 3Last Post: 16 Mar 2007, 6:50 AM -
Ext.Button(document.body, {...}) failes to render???
By vtswingkid in forum Ext 1.x: Help & DiscussionReplies: 2Last Post: 19 Jan 2007, 9:59 AM -
BorderLayout within FORM rather than BODY
By kalebwalton in forum Community DiscussionReplies: 2Last Post: 22 Dec 2006, 2:38 PM -
BorderLayout ContentPanel body height
By pomata in forum Ext 1.x: BugsReplies: 0Last Post: 30 Nov 2006, 6:24 PM -
overlay.body has no properties?
By thejoker101 in forum Ext 1.x: Help & DiscussionReplies: 6Last Post: 26 Oct 2006, 7:50 AM


Reply With Quote
