homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
Forum Library, Charter, Moderator: open

JavaScript and AJAX Forum

Jquery for Overlay close and reopen
A cancel button closes the overlay but when the overlay is tried to reopen

5+ Year Member

Msg#: 4219251 posted 1:33 pm on Oct 20, 2010 (gmt 0)
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.



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

Msg#: 4219251 posted 2:16 pm on Oct 20, 2010 (gmt 0)

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.

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved