PDA

View Full Version : BasicDialog with "autoTabs



Alidad
22 Dec 2006, 12:01 PM
Hi, i have created basic dialog auto tab for myself to learn, just like sample of "Hello world" from Jack program, I have tested and works great with firefox, but when I tested IE 7, is kept freezing.

I have fix some code but still something missing myself. Does any one know what it might be relate to from .js file that might cause problm with IE!

I have put js file of utilities.js and rest of .css file and is works great in firefox but is not working in IE correctly. Can anyone help me if i need to check relate to IE!

Alidad Modjtabai
Alidad@comcast.net

tryanDLS
22 Dec 2006, 12:17 PM
Kinda hard to tell without code or a link. My first guess is that you have a missing comma. Read the sticky thread about extra commas

http://www.yui-ext.com/forum/viewtopic.php?t=607

Alidad
22 Dec 2006, 12:46 PM
here is code that i have, i have tested is works great with firefox but in IE is freezing and could not be able to close it.


<script type="text/javascript" src="yui/build/utilities/utilities.js"></script>

<script type="text/javascript" src="yui-ext/yui-ext.js"></script>

<link rel="stylesheet" type="text/css" href="yui-ext/resources/css/reset-min.css" />
<link rel="stylesheet" type="text/css" href="yui-ext/resources/css/resizable.css" />
<link rel="stylesheet" type="text/css" href="yui-ext/resources/css/tabs.css" />
<link rel="stylesheet" type="text/css" href="yui-ext/resources/css/basic-dialog.css" />
<link rel="stylesheet" type="text/css" href="yui-ext/examples/tabs/tabs-example.css" />
<link rel="stylesheet" type="text/css" href="yui-ext/resources/css/grid.css" />
<link rel="stylesheet" type="text/css" href="yui-ext/examples/example.css" />





<script type="text/javascript">
var HelloWorld = function(){
var dialog, showBtn;
return {
init : function(){
showBtn = getEl('show-dialog-btn');
// attach to click event
showBtn.on('click', this.showDialog, this, true);
},

showDialog : function(){
if(!dialog){ // lazy initialize the dialog and only create it once
dialog = new YAHOO.ext.BasicDialog("hello-dlg", {
//modal:true,
resizable:false,
autoTabs:true,
modal:true,
draggable:false,
width:420,
height:300,
shadow:true,
minWidth:300,
minHeight:250,
proxyDrag: true

});

}


dialog.show(showBtn.dom);
// dialog.getTabs('jtabs');
if(!dialog.getTabs().getTab('jtabs-1'))
{
var tabs = dialog.getTabs();
tabs.addTab('jtabs-1', "First Tab");

var tab2 = tabs.addTab('jtabs-2', "Tab 2");
var updater = tab2.getUpdateManager();
updater.setDefaultUrl('yui-ext/examples/tabs/ajax1.htm');
tab2.onActivate.subscribe(updater.refresh, updater, true);

var tab3 = tabs.addTab('jtabs-3', "Tab 3");
tab3.setUrl('yui-ext/examples/tabs/ajax2.htm', null, true);


}


}
};
}();

YAHOO.ext.EventManager.onDocumentReady(HelloWorld.init, HelloWorld, true);
</script>

Any idea what went wrong!

Alidad

Alidad
22 Dec 2006, 2:04 PM
i think i found the problme but not sure if i'm right, i have some graphics on the body page, and i put that hello world dialog button on the top of page, when to run on IE is freezing, but is works fine in firefox.

So then i test in blank page WIHTOUT any design or information in body and is works great in IE and firefox. so what it might be cause problme between having graphics or information the in body and blank body page!

Alidad

jack.slocum
23 Dec 2006, 4:45 AM
Can yout put up a link? We would only be shooting in the dark otherwise.