busboy
February 18, 2015, 12:22am
1
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!
pr0c3ss
February 18, 2015, 5:01am
2
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>
busboy
February 18, 2015, 8:08pm
3
Unfortunately I continue to get an empty white lightbox once your code is executed. Any ideas on what else I should try?
Thank you!
pr0c3ss
February 19, 2015, 5:16am
4
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?
system
Closed
May 21, 2015, 12:25pm
5
This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.