function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Sure@DreamSure@Dream 

Script widget is not getting displayed on switching between <apex:tab>s in <apex:tabpanel>

Hi All,

I am having a widget to upload file to box.com inside a <apex:tab>.
That widget is being displayed uing a <script> tag

My Page structure is as follows:
<apex:tabpanel switchType="ajax" selectedTab="tab1">
    <apex:tab name="tab1">
         <script to show the box.com upload widget/>
     </apex:tab>
<apex:tab name="tab2">
         ---some other content--
     </apex:tab>
</apex:tabpanel>

First time when the page is loaded the widget is appearing.
When i switch to second tab and come back to first tab, the widget is not appearing.

Could you please help me with this?
Best Answer chosen by Sure@Dream
Sure@DreamSure@Dream
Hi,

I have updated the page as follows, and its working now:

<apex:tabpanel switchType="ajax" selectedTab="tab1">
    <apex:tab name="tab1" switchType="server">
         <script to show the box.com upload widget/>
     </apex:tab>
<apex:tab name="tab2">
         ---some other content--
     </apex:tab>
</apex:tabpanel>

Thanks