boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Java版 - 又来麻烦大家,一个extJs的问题 (也许别的script也可以)
相关主题
如何改变JDK 的语言设置
JQuery
display field validation message with the field
Re: [转载] create gif/png image in C or ja
库里有一个函数名也叫Time
Only definition is showed with F3 in Eclipse?
How to obtain frame id from ActionEvent? Thanks
String[] a = c.toArray(new String[0])
anyone has experience with ZK?
ZK vs Click
相关话题的讨论汇总
话题: extjs话题: option话题: return话题: page话题: innerhtml
进入Java版参与讨论
1 (共1页)
d**k
发帖数: 1223
1
这两天接了外包的一个做了半截的project,需要接着作完,同时又添了很多新的
function. 其中有一个page, 有一个drop down list, 根据选中的option,弹出一个对
话框 (一个 form),不管选哪个option, form都一样,只是在对话框的title上显示选
中的option. 现如今改规矩了, 要根据选的不同的option,弹出的对话框里显示不同
的input fields, 至于显示什么fields, 那得根据选中的option, 到database里去找。
本来想单独做一个form 去 post, 但是要求我不能添新的page,只能在原来的page里改
动,( 也就是说,只能动动javascript 了)。说来说去似乎也就是用js (原来的
page用的是extJs, ) 从database取数据这么个过程,但是俺比较土,从来没弄过,看
过几眼json, 也没怎么用。这儿大牛多,给点儿提示?谢谢了。
r*****l
发帖数: 2859
2
You need to initiate an ajax get request and then program against the return
data. Two possible solutions:
1, Return json and you program the innerHTML of the dialog.
2, Return html snippet and put it as innerHTML of the dialog.
I did not use extJs. However, if you know javascript pretty well, this
should not be a big task.

【在 d**k 的大作中提到】
: 这两天接了外包的一个做了半截的project,需要接着作完,同时又添了很多新的
: function. 其中有一个page, 有一个drop down list, 根据选中的option,弹出一个对
: 话框 (一个 form),不管选哪个option, form都一样,只是在对话框的title上显示选
: 中的option. 现如今改规矩了, 要根据选的不同的option,弹出的对话框里显示不同
: 的input fields, 至于显示什么fields, 那得根据选中的option, 到database里去找。
: 本来想单独做一个form 去 post, 但是要求我不能添新的page,只能在原来的page里改
: 动,( 也就是说,只能动动javascript 了)。说来说去似乎也就是用js (原来的
: page用的是extJs, ) 从database取数据这么个过程,但是俺比较土,从来没弄过,看
: 过几眼json, 也没怎么用。这儿大牛多,给点儿提示?谢谢了。

d**k
发帖数: 1223
3
谢谢回复。说来惭愧,听着意思好像都明白,但不知道怎么弄。。。。您能给个sample
的link什么的吗? 谢谢了

return

【在 r*****l 的大作中提到】
: You need to initiate an ajax get request and then program against the return
: data. Two possible solutions:
: 1, Return json and you program the innerHTML of the dialog.
: 2, Return html snippet and put it as innerHTML of the dialog.
: I did not use extJs. However, if you know javascript pretty well, this
: should not be a big task.

c********g
发帖数: 449
4
since original codes are developed with EXTJS, you should follow it.
and Using EXTJS to implement above function is not hard.
you can dynamically define the formPanel based on the user selected option
and load data by calling Ext.Ajax.request({}).
then popup it.
1 (共1页)
进入Java版参与讨论
相关主题
ZK vs Click
请推荐好的AJAX技术
有人玩macro language 么? (转载)
hash function question
介绍个做web的framework吧!
请帮忙推荐个3,4天的java web framework 的training course
想用javascript开发应用
Node.js, server-side javascript
JBOSS
前台javascript+后台java,用google gwt,还是自己手写javascript?
相关话题的讨论汇总
话题: extjs话题: option话题: return话题: page话题: innerhtml