Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
167 views
in Technique[技术] by (71.8m points)

javascript - 如何在Oracle Apex中使用JavaScript隐藏区域(How to hide regions with javascript in Oracle Apex)

I have a Radio group and depending on the value selected, I want a specific region to appear and make 2 other regions disappear.(我有一个“广播”组,根据所选的值,我希望出现一个特定区域并使其他两个区域消失。)

However when I hide the regions, the region that is visible doesn't take all the space available which leaves an empty space.(但是,当我隐藏区域时,可见区域并不会占用所有可用空间,因此会留下一个空白空间。) Like this(像这样) 像这样 I was using the $x_Hide('ItemID') method like a website suggested but it doesn't collapse the space like the page claimed.(我正在像网站建议的那样使用$x_Hide('ItemID')方法,但它不会像声明的页面那样折叠空间。) I've noticed that the x_Hide doesn't actually remove the div where the region was.(我注意到x_Hide实际上并未删除区域所在的div 。) The div is still present and its content is too.(div仍然存在,其内容也是如此。) div仍然存在并且它也很满足 I then tried the $x("ItemID").remove() function but this time the div was still there but its content was missing.(然后,我尝试了$x("ItemID").remove()函数,但是这次div仍然存在,但是其内容丢失了。) Is there a way to make it so that the remaining region takes all the available space?(有没有一种方法可以使其余区域占用所有可用空间?)   ask by Hastaroth translate from so

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

UI design of APEX is responsive out of the box.(APEX的UI设计开箱即用。)

All you will need is to get the handle of right region and hide it.(您需要做的只是获得正确区域的手柄并将其隐藏。) The effect that you are looking for will get applied if done right.(如果操作正确,您正在寻找的效果将得到应用。) In case you are having difficulties locating appropriate regions using javascript then other simpler solution would be to use Dynamic Actions feature and would be go to option if you are just beginning with APEX.(如果您在使用javascript定位合适的区域时遇到困难,那么其他更简单的解决方案是使用动态动作功能,如果您只是从APEX开始,则可以选择。) Dynamic actions provide a way to define complex client-side behavior declaratively without the need for JavaScript.(动态动作提供了一种声明式定义复杂客户端行为的方式,而无需使用JavaScript。) Refer Oracle Docs for more info on Dynamic Actions --> link(有关动态操作 -> 链接,请参考Oracle文档。)

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...