ext combobox数据验证 20

对于一个combobox里有四个值,我现在需要在提交数据(点击按钮)的时候根据这四个不同的值提交到不同的页面,请问怎么实现啊!combobox代码:newExt.form... 对于一个combobox里有四个值,我现在需要在提交数据(点击按钮)的时候根据这四个不同的值提交到不同的页面,请问怎么实现啊!
combobox代码:
new Ext.form.ComboBox({
fieldLabel: '业务类型',
name:'com',
hiddenName: 'com',
id:'type',
width:130,
store: new Ext.data.SimpleStore({fields: ['v', 't'],data : [['v1','存款'],['v2','贷款'],['v3','理财'],['v4','银行卡']]}) ,
valueField:'v',displayField:'t',typeAhead: true,mode: 'local',triggerAction: 'all',emptyText:'全部...',
selectOnFocus:true
}),

提交函数的
handler:function(){
var comtext = com.getValue();

//conFormPanel.form.action = 'http://www.baidu.com';
//conFormPanel.form.target=tt;
//conFormPanel.form.submit();
if(comtext=='存款'){
searchResultTabs.add({
id:'result-'+tabNum,
title: '查询-'+tabNum,
border: false ,
closable:true ,
height:h,
autoScroll:true ,
html: '<iframe src=pcrm-searchAcctResult.html frameborder="0" style="width:expression(this.parentNode.offsetWidth); height:expression(this.parentNode.offsetHeight-30);border-style:none #ffffff solid"></iframe>'
}).show();
}
if(comtext=='取款'){
searchResultTabs.add({
id:'result-'+tabNum,
title: '查询-'+tabNum,
border: false ,
closable:true ,
height:h,
autoScroll:true ,
html: '<iframe src=pcrm-searchAcctResult1.html frameborder="0" style="width:expression(this.parentNode.offsetWidth); height:expression(this.parentNode.offsetHeight-30);border-style:none #ffffff solid"></iframe>'
}).show();
}

tabNum ++;
}
展开
 我来答
百度网友b8b7fb5be
2010-04-29 · TA获得超过322个赞
知道答主
回答量:219
采纳率:0%
帮助的人:103万
展开全部
定义成一个全局要提交到的页面比如var http=‘’;当你combo选择不同值的时候会触发事件‘select’或者‘change’都可以,然后比如你选中的是a,然后你就在给http幅a要跳转的页面值,如果选中的是b,那么就幅b要跳转的页面值(判断你自己加上,比如是a还是b,你自己加一个判断就好了),最后你提交//conFormPanel.form.action = http;
的时候就是你所选中的那个提交的页面了。明白吗??
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式