Javascript to redirect to another page WITHIN the same lightbox

I need some help with this javascript. This code launches a lightbox for me. Once the lightbox is showing, I need to modify the following code to take me to another PHP page while still remaining in the original lightbox. Currently the lightbox goes to an empty while page when the following code is executed.

<script type='text/javascript'>
  jQuery(document).ready(function($){
  			  
      jQuery.extend(jQuery.lightbox().options, {
       moveTransition   : 'linear',
       resizeTransition : 'linear',
       moveDuration     : 2,
       resizeDuration   : 2
    });
  
    jQuery.lightbox('popupMember.php?action=view&uID=$uID&lightbox[iframe]=true&lightbox[width]=600&lightbox[height]=600');

  });
</script>

Thank you!

This function on a timer may help.

<script type="text/javascript">
var start = new Date();
start = Date.parse(start)/1000;
var seconds = 10;
function CountDown(){
    var now = new Date();
    now = Date.parse(now)/1000;
    var counter = parseInt(seconds-(now-start),10);
    document.getElementById('countdown').innerHTML = counter;
    if(counter > 0){
        timerID = setTimeout("CountDown()", 100)
    }else{
        location.href = "your webpage"
    }
}
window.setTimeout('CountDown()',100);
</script>
<script type="text/javascript">
window.setTimeout('counter()',100);
</script>

Unfortunately I continue to get an empty white lightbox once your code is executed. Any ideas on what else I should try?

Thank you!

should work… put your countdown container inside your while page

<span id="countdown">10</span> Seconds.

the js script put before your end < /body> tag

in browser press f12 > console … any errors?

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.