开发者

How to show or hide fields on a GSP based on a selection in a combo-box

I'm still new to grails, so I'm really sorry for asking somet开发者_JAVA技巧hing like this.

I have a domain that could be divided in 3 types, so I'd like to create a combo-box and depending on which selection the user made, it will show some fields and hide others. How can I achieve this?

Thanks again and sorry for this dumb question.


This is actually something that is commonly done with JavaScript. You could attach an 'on change' event handler to your combo-box that would show/hide the appropriate elements as needed. In case you're not familiar with how to do this with Javascript, I'd recommend you take a look at jQuery: http://api.jquery.com/change/

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜