You need to sign in to do that
Don't have an account?
san5aug
outputPanel is rendering, but its content is not visible.
Hi,
I am trying to include one js file dynamically in component. For this I have created a boolean property .I am setting its value through commandbutton. But its not working. Please help.
Component Code
Controller Code
I am getting alert 'true" after clicking command button. But there is no scipt included. When I search HTML source of this page it shows blank jQueryPanel as below. I am wondering from where this alert is comming if there is nothing in source.
Page Source.
I am trying to include one js file dynamically in component. For this I have created a boolean property .I am setting its value through commandbutton. But its not working. Please help.
Component Code
<apex:outputPanel id="jQueryPanel"> <apex:outputPanel rendered="{!includejQuery}" > <apex:includeScript value="https://code.jquery.com/jquery-1.10.2.min.js" /> <script type="text/javascript"> alert('{!includejQuery}'); </script> </apex:outputPanel> </apex:outputPanel> <apex:commandButton status="statusProcess" value="New" action="{!showPopup}" rerender="jQueryPanel" />
Controller Code
public boolean includejQuery {get;set;} public void showPopup(){ includejQuery = true; } public void closePopup() { includejQuery = false; }
I am getting alert 'true" after clicking command button. But there is no scipt included. When I search HTML source of this page it shows blank jQueryPanel as below. I am wondering from where this alert is comming if there is nothing in source.
Page Source.
<span id="MirHome:form1:j_id358:j_id391:2:j_id393"><span id="MirHome:form1:j_id358:j_id391:2:j_id393:j_id394:jQueryPanel"></span>
We have implemented your code in our developer box and have not find any issue in it.
The jquery is rerendering properly on button click. Please see screen shot below.
Please mark as best answer if it solves your problem.
Regards,
Grazitti Team,
www.grazitti.com
I want to include a js file dynamically. When I add this file statically as below, things are working fine.
but when I try to add this file dynamically as below, things are not working.
Please help.