here is my js code
<script type='text/javascript'>
// Browser safe opacity handling function
function setOpacity( value ) {
document.getElementById("popup").style.opacity = value / 10;
document.getElementById("popup").style.filter = 'alpha(opacity=' + value * 10 + ')';
}
function fadeInMyPopup() {
for( var i = 0 ; i <= 100 ; i++ )
setTimeout( 'setOpacity(' + (i / 10) + ')' , 8 * i );
}
function fadeOutMyPopup() {
for( var i = 0 ; i <= 100 ; i++ ) {
setTimeout( 'setOpacity(' + (10 - i / 10) + ')' , 8 * i );
}
setTimeout('closeMyPopup()', 800 );
}
function closeMyPopup() {
document.getElementById("popup").style.display = "none"
}
function fireMyPopup() {
setOpacity( 0 );
document.getElementById("popup").style.display = "block";
fadeInMyPopup();
}
</script>
this code works fine. i am using this code to pop-up a light box for emailing friends. what i am stuck with, once i submit the i will like to say thank you on the same pop-up. right now here is how i am saying thank you: this goes to a new window. but i want it on the same light box window.
<SCRIPT language="JavaScript">
<!--
window.location="thanks.php";
//-->
</SCRIPT>
here is how i call my light box in my other code:
<div id="popup" name="popup"><?php include ("email.php"); ?></div>
any ideas on achieving this. many thanks.