Note that there are some explanatory texts on larger screens.

plurals
  1. POusing colorbox over another colorbox using jquery/ajax
    primarykey
    data
    text
    <p>i have a page where i'm using a with id="emailfrnd", from the following script i successfully implemented the colorbox:</p> <pre><code>&lt;script type="text/javascript"&gt; $(document).ready(function(){ $("#emailfrnd").colorbox({ inline: true, href:"#ef", close:"", opacity:0.95, onClosed:function(){ //window.parent.location.reload(true); } }); }); &lt;/script&gt; </code></pre> <p>now the new colorbox contains a form with a send button in it of id "emailfrnd_submit" now i had written some validations using the jquery &amp; ajax and if there are no errorMessages i'll get another colorbox and the code is as follows:</p> <pre><code>if (errorMessage == '') { $.ajax({ type: 'POST', url: root_url + '/services/services.php?method=emailfrnd', data: "name=" + name + "&amp;email=" + email + "&amp;message=" + message, async: true, success: function (data) { if (data == 1) { $("#emailfrnd_submit").colorbox({ inline: false, close: "", html: "&lt;div style='height:230px;width:400px;display:block;'&gt;&lt;p style='color:black;font:16px verdana;'&gt;Your email was successfully sent.&lt;/p&gt;&lt;br/&gt;&lt;p style='color:gray; font:16px verdana;'&gt;Thank you for telling your friend&lt;/p&gt;&lt;div id='emailfrnd_sub' style='width: 50px;margin-top:30px;float: right;'&gt;&lt;input type='submit' value='OK' name='emailfrnd_submit' id='emailfrnd_sub' class='redbut' style='float:right;position:absolute;right: 198px;margin-top: 0px;color:white;'&gt;&lt;/div&gt;&lt;/div&gt;", opacity: 0.95, onClosed: function () { //window.parent.location.reload(true); } }); //window.location.assign("../index.php"); } else { alert('mail not send'); } } }); } else { alert(errorMessage); } }); </code></pre> <p>upto now i succeed in getting the things as i want, here after doing the validations and onclick the send button according to this code a new colorbox with the html content as above is coming, here i have a Ok button here, i want to make that button as the closing button of this colorbox. how can i get that functionality for the ok button here?? anyone help is much appreciated....thanks in advance.....</p>
    singulars
    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.
 

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