Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Hide container
claushelth
Is it not possible to hide a container as default either with som visible tag or with formApi?
If I do like tihis:
<container name="dropdown">
<item name="claus">
<text />
</item>
<item name="claus2">
<text />
</item>
</container>
then it's possible to hide the container when I click my button with forApi, but even thoug I have set the element not visible as default, when the page loads, the container will not disapear until I click my button???
In both casses I'm using this one
IWDatacapture.getItem("dropdown").setVisible(false);
I can't really find any documentation about this!
I'm using TeamSite version 6.1.0 Service Pack 1
- Claus
Find more posts tagged with
Comments
sargur
claushelth:
I am new to Teamsite but with my limited knowledge, what I understand if you are trying to hide the container in FormAPI, I know in temsite 6.5, u have to give a reference to the rootcontainer and then the child container to hide the container.
eg: if your root container is called "root" then your statement to hide the container wud be
IWDatacapture.getItem("/root/dropdown").setVisible(false);
Is that you are looking at?
claushelth
Hi
yes you are right, but this is not the problem. For this little example there is not any outer container.
My container can be hidden if I att. an event to a button and then call IWDatacapture.getItem("dropdown").setVisible(false);
I got a solution, but it's very ugly.
I discovered that when initialising my code, and calling IWDatacapture.getItem("dropdown").setVisible(false); there was an error.
It seems like the container dropdown is not created yet in the browser. To hide it anyway, I setup a timeout, so when the code is ready it's getting hidden.
setTimeout('hideContainer()', 1000) //wait 1 second to hide the elements
function hideContainer()
{
IWDatacapture.getItem("dropdown").setVisible(false);
}
web.xml.zip
jbonifaci
You should be registering your init function like so:
IWEventRegistry.addFormHandler("onFormInit", init());
This should ensure the form has loaded before your function gets called.
~Jeff