J
|
jacques 12/3/2019 |
Hello How to hide a tab based on a value of a field? Thanks you very much
|
O
|
oliviercoulon@free.fr author 12/3/2019 |
on "before display": get fieldvalue $x123 = "hide"; pass it with $pageObject->setProxyValue("tab1", #x123); Thanks Where is my error ? musicien is my fields var ctrlMusicien = Runner.getControl(pageid, 'musicien'); var tabsLoad = pageObj.getTabs(); if (ctrlMusicien.getValue()=="faux"){ tabs.hide(2); tabs.hide(3); tabs.hide(4); tabs.hide(5); } else { tabs.show(2); tabs.show(3); tabs.show(4); tabs.show(5); } ; on Javascript Onload: var tabs = pageObj.getTabs(); if(proxy.tab1 =="hide"){ tabs.hide(1); } see manual https://phprunner.com/phprunner/docs/hide.htm |
O
|
oliviercoulon@free.fr author 12/3/2019 |
var ctrlMusicien = Runner.getControl(pageid, 'musicien'); |
O
|
oliviercoulon@free.fr author 12/3/2019 |
THANKS |
![]() |
Sergey Kornilov admin 12/3/2019 |
What does this code do now? Any Javascript errors? |
O
|
oliviercoulon@free.fr author 12/3/2019 |
What does this code do now? Any Javascript errors? https://xlinesoft.com/phprunner/docs/troubleshooting_javascript_errors.htm |
O
|
oliviercoulon@free.fr author 12/3/2019 |
the tab are not hide |
O
|
oliviercoulon@free.fr author 12/4/2019 |
No error but the tab are not hide !! |
K
|
keithh0427 12/4/2019 |
You have: |
O
|
oliviercoulon@free.fr author 12/4/2019 |
You have: var tabsLoad = pageObj.getTabs(); and using: tabs.hide(2); tabs.hide(3); tabs.hide(4); tabs.hide(5); try this: var tabs = pageObj.getTabs();
|
K
|
keithh0427 12/4/2019 |
I have something similar in my project, but it's based on field values, not clicking on the field. |