PDA

View Full Version : Big window form



Mycoding
19 Jul 2010, 12:07 AM
Please, give me advice how to fix it
http://vreshenie.ru/form.PNG


<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1251">
<title id="page-title">????? ??????</title>
<link rel="stylesheet" type="text/css" href="http://www.sencha.com/deploy/dev/resources/css/ext-all.css">
<script type="text/javascript" src="http://www.sencha.com/deploy/dev/adapter/ext/ext-base.js"></script>
<script type="text/javascript" src="http://www.sencha.com/deploy/dev/ext-all.js"></script>
<script type="text/javascript" src="http://moc-081.ru/ext/src/locale/ext-lang-ru.js" charset='utf-8'></script>
<script type="text/javascript">
Ext.onReady(function() {
Ext.QuickTips.init();
var win,
button = new Ext.Button({
text:'??????? ?????',
renderTo:Ext.getBody(),
handler:showForm
});
function showForm(){
if(!win){
var clientForm = new Ext.FormPanel({
frame: true,
defaultType: 'textfield',
items: [{
fieldLabel: '???? ??? (?.?.?.)',
name: 'first',
anchor: '90%',
allowBlank:false
},{
fieldLabel: '????????? ???????',
name: 'company',
anchor: '90%',
allowBlank:false
},{
fieldLabel: '?????????? ???????',
name: 'address',
anchor: '90%',
allowBlank:false
},{
fieldLabel: '??? e-mail',
name: 'email',
vtype:'email',
anchor: '90%',
allowBlank:false
},{
xtype:'fieldset',
title: '????? ????????',
items: [{
xtype: 'textarea',
hideLabel: true,
name: 'address',
height:70,
anchor:'98%',
html:'??????? ??? ?????? ???????? ?????, ?? ????? ????? ??????? ??????? ? ????'
}]
},{
fieldLabel: '????? ????????',
xtype:'textarea',
name: 'time1',
anchor: '90%',
height:22,
anchor: '90%',
html:'??????: ?? 00:00 ?? 00:00 '
},{
xtype:'fieldset',
title: '?????????',
items: [{
xtype: 'textarea',
hideLabel: true,
name: 'msg',
height:70,
anchor:'98%'
}]
}],
buttons:[{
text: '???????? ??????',
handler: function(){}
}]
});

win = new Ext.Window({
frame:true,
title:'Client data',
width:400,
height:400,
closeAction:'hide',
closable: true,
items: clientForm,
collapsible: true,
autoHeight:true,
//renderTo:'test'
animateTarget:Ext.getBody(),

});
}
win.show();

}
});
</script>
</head>
<body style='height:2000px'>
<div id="test" style='position:absolute;left:300;top:300'></div>
</body>
</html>

Condor
19 Jul 2010, 1:04 AM
1. Make your window autoScroll:true.
2. Write code to reduce the window height if it will not fit the viewport.

Mycoding
19 Jul 2010, 1:07 AM
Thaks a lot, I will try.