Welcome to WebmasterWorld Guest from

Forum Moderators: open

Message Too Old, No Replies

Jquery for Overlay close and reopen

A cancel button closes the overlay but when the overlay is tried to reopen



1:33 pm on Oct 20, 2010 (gmt 0)

5+ Year Member

I have a subscribe form which has a continue button onclick of which the overlay pops up with two checkboxes. The overlay has two buttons submit and cancel submit is working fine with validations but when i cancel the overlay closes. But when i click on the continue button again nothing happens.
I am using the following code for loading the overlay when Continue button is clicked:

<script type="text/javascript" src="/js/jquery-1.4.2.min.js"></script>
<script type="text/javascript" src="/js/jquery.plugins.min.js"></script>

<script type="text/javascript">
var popup;
$(document).ready(function() {
//setup the consent popup
popup = $("#consentPopup").overlay({
mask: {
color: '#000000',
opacity: 0.5,
loadSpeed: 200
top: 'center',
closeOnClick: false


function Hcp_ParticipantContinue_Success() {

function show()
if (document.getElementById('consentPopup').style.display == 'none')


//Hcp_ParticipantContinue is method which returns true after validating the form ,after this the overlay loads which has the div id="consentPopup"

//For Cancel button (id="consentCancel") following jquery is written within the consentPopup div at the end:

<script type="text/javascript">
var popup;
$("#consentCancel").click(function() {
popup = 1;

Please respond back with your replies.


2:16 pm on Oct 20, 2010 (gmt 0)

WebmasterWorld Senior Member fotiman is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

Your show method is checking to see if the element with id 'consentPopup' has it's display property set to none before it will attempt to call popup.data("overlay").load(). So I suspect that perhaps the popup.data("overlay").close() method does not set the 'concentPopup' display property to none. You might want to try adding a break point in Firebug to see what the values are.

Featured Threads

Hot Threads This Week

Hot Threads This Month