You need to sign in to do that
Don't have an account?
svd
How to close LightBox in VisualForce
Hello,
I installed lightbox component from appexchange. instead of hiding the box, is there a way to close the box ?
Given code in the component
box.setContentInnerHTML("<a href=\"#\" onclick=\"box.hide();\">Close</a><br /><br /><p>{!content}</p>");
Instead of hiding it, I want to close the box (lightbox window). For eg, if I'm playing audio content, this function will hide the box but still play the audio. So I want to close the lightbox window completely.
Thanks in advance for your help.
Have you tried box.remove() or box.dispose() in place of box.hide()? Try the sample code given below :
box.setContentInnerHTML("<a href=\"#\" onclick=\"box.remove();\">Close</a><br /><br /><p>{!content}</p>");
Hope this helps.