Note that there are some explanatory texts on larger screens.

plurals
  1. POClosing and opening two model pop-ups subsequently on a Button's Click event using JQuery
    primarykey
    data
    text
    <p>I am using a JQuery to open and close a model pop-up.</p> <pre><code>//Function to open pop-up function UserSignupModalpopupFromSubDomain(guid,title) { var srcFile = "../ModelPopup/SignUpPopup.aspx"; if (guid) srcFile += '?location=' + guid+'&amp;title=' + title; /* sample code to append a unique user ID to page called */ var cFrame = new Element('iframe').setProperties({id:"iframe-signup", name:"iframe-signup", height:'420px', width:'584px', frameborder:"0", scrolling:"no"}).injectInside(document.body); $('iframe-signup').src = srcFile; customModalBox.htmlBox('iframe-signup', '', 'Sign up'); $('mb_contents_Popup').addClass('yt-Panel-Primary_Popup'); new Element('div').setHTML('&amp;nbsp;').setProperty('id','mb_Error_Popup').injectTop($('mb_center_Popup')); new Element('h2').setHTML('Sign UP').setProperty('id','mb_Title_Popup').injectTop($('mb_contents_Popup')); // $('mb_center').setStyle('z-index','2005'); // $('mb_overlay').setStyle('z-index','2004'); $('mb_center_Popup').setStyle('z-index','2005'); $('mb_overlay_Popup').setStyle('z-index','2004'); } // pop-up close function function UserSignUpClose() { $('mb_close_link').addEvent('click', function() { //if($('yt-UserProfileContent1')) $('yt-UserProfileContent1').remove(); if($('iframe-signup')) $('iframe-signup').remove(); if($('mb_Title_Popup')) $('mb_Title').remove(); if($('mb_contents_Popup')) $('mb_contents_Popup').removeClass('yt-Panel-Primary_Popup'); if($('mb_Error_Popup')) $('mb_Error_Popup').remove(); $('mb_overlay_Popup').setStyle('z-index','1600'); }); } </code></pre> <p>the close function is working fine when we use it with "Cancel" button of the pop-up window.</p> <p>But i want to close a opened pop-up window and open a new pop-up subsequently using same link button, and for this i tried as below at Page_load of aspx.cs page :</p> <pre><code>lnkButton.Attribues.Add("onClick","UserSignUpClose();"); lnkButton.Attribues["onClick"]+="UserSignupModalpopupFromSubDomain(location.href,document.title);"; </code></pre> <p>but its not working While i tried to get and using its ids, i couldn't get its properties like id and type and innerHTML.</p> <p>prior thanks.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload