Is there a snippet to open POP - UP action using JAVASCRIPT. I need to add a condition before the P

Is there a snippet to open POP - UP action using JAVASCRIPT. I need  to add a condition before the POP UP comes up. If a= 1 then show popup else do not open the pop up box on a button click.

Try this post: http://community.skuid.com/skuid/topics/can_i_destroy_and_then_create_a_pop_up_via_snippet

Thanks Raymond, It did work perfectly.

You may consider using this instead as the popup can be managed normally vs creating it in XML.
http://community.skuid.com/skuid/topics/template-component-with-action-framework

You can skuid.events.publish(youreventnamehere) in your javascript to call the popup.