PDA

View Full Version : how to use autoLoad in Panel ???



missg
20 Oct 2010, 12:19 AM
I have one page (b.html) which have google map code inside. I can call http://localhost/myproject/b.html which it can display a google map successfully.

But my problem is ... I create new html page ( a.html ) and create panel which load b.html by autoLoad configuration like my code below.

a.html

var mapPanel = new Ext.Panel({
renderTo: 'googlemap',
style:"margin: 5px auto 5px auto;",
bodyStyle: "text-align:center;",
frame: true,
title: 'Google Map',
autoHeight: true,
layout: 'form',
split: true,
autoLoad: {
url: 'b.html',
scripts: true

}
})

I got result --> page loading (blank page) and at task bar I got "Read maps.gstatic.com" .....


why it does not display a map ???????


Anybody pls give me a way to solve it :(


Many Thanks ..

Condor
20 Oct 2010, 12:29 AM
autoLoad is only meant to load HTML fragments, not full HTML pages.

You could use:

bodyCfg: {tag: 'iframe', src: 'b.html'}
but that doesn't work for autoHeight:true panels.

missg
20 Oct 2010, 12:42 AM
Special Thanks ... Condor ^____^

I got it ... my problems already solved.

really thanks.