hi im tryinng to get my page to reload after a popout box has been closed.
what currently happens is a user clicks a button to open a youtube video whichis displayed in a pop out box but when it ends or the user closes the pop out i want the origonal page to reload any ideas appreciated
whats your code look like?
like this
[php]
<?php //Start session session_start(); $content=""; error_reporting(0);//dont display errors //Check whether the session variable SESS_MEMBER_ID is present or not or to make sure that the user has not got a student membership if(!isset($_SESSION['SESS_MEMBER_ID']) || (trim($_SESSION['SESS_MEMBER_ID']) == ''|| ($_SESSION['SESS_MEMBER_TYPE']) == 'Student')) { header("location: access-denied.php"); exit(); } //Include database connection details require_once('config.php'); //Connect to mysql server $link = mysql_connect(DB_HOST, DB_USER ,DB_PASSWORD); if(!$link) { die('Failed to connect to server: ' . mysql_error()); } //Select database $db = mysql_select_db(DB_DATABASE); if(!$db) { die("Unable to select database"); } // query to get all records from class what the user belongs to by user id $qry = "SELECT DISTINCT User.userName, Result.resultID, Test.testName, Class.className FROM User, Result,Test,Class WHERE Result.userID = User.userID AND Result.testID = Test.testID AND Test.className = Class.className AND flag = 'yes' AND teacherID='$_SESSION[SESS_MEMBER_ID]' ORDER BY Test.testID"; $result = mysql_query($qry) or die(mysql_error()); while($row = mysql_fetch_array($result)){ $content .='PeerAssessment
<div id="navMenu">
<ul><li><a href="Logout.php">Log out</a></li></ul>
<ul><li><a href = "Teacher-Page.php">Main</a></li></ul>
<ul>
<li> <a href="#">Admin</a>
<ul>
<li><a href="Add-user.php">Add user</a></li>
<li><a href="Remove-user.php">Remove user</a></li>
<li><a href="Add-Class.php">Add class</a></li>
<li><a href="Remove-Class.php">Remove class</a></li>
<li><a href="Edit-Class.php">Edit class</a></li>
<li><a href="Settings.php">Settings</a></li>
</ul>
</li>
</ul>
<ul>
<li> <a href="#">Tests</a>
<ul>
<li><a href="Test-Page.php">Set test</a></li>
<li><a href="Delete-Test.php">Delete test</a></li>
</ul>
</li>
</ul>
<ul>
<li> <a href="#">Profile</a>
<ul>
<li><a href="Flags.php">View flags</a></li>
<li><a href="View-Results.php">View results</a></li>
<li><a href="View-Reports.php">View reports</a></li>
</ul>
</li>
</ul>
<br class="clearFloat" />
</div> <!-- end navMenu -->
<div id="content">
<!-- ### Post Entry Begin ### -->
<h2><u>View flags</u></h2>
</div>
<div id = "table">
<p/>
<table id ="dashed" align = "center" width = 80%>
<form action ="Flags.php" method = "post" >
<tr id ="dashed" align = "center">
<td id ="dashed"><b>Class</b></td>
<td id ="dashed"><b>Test Name</b></td>
<td id ="dashed"><b>Student username</b></td>
<td id ="dashed"><b>Selected</b></td>
</tr>
<?php echo $content;?>
<?php echo $button;?>
</table>
</form>
<p/>
</div>
<p/>
<br/>
Copyright © 2011 PeerAssesment.com
[/php]
You using shadowbox for the popup? If so read this. might help
cheers for the help but my code was different to the one you directed me to but not to worry i found it.
for anyone who has the same problem simply replace
[php]Shadowbox.init(); [/php]on the original page with
[php]Shadowbox.init({
language: ‘en’,
players: [‘img’, ‘html’, ‘iframe’, ‘qt’, ‘wmp’, ‘swf’, ‘flv’],
onClose: function(){ window.location.reload(); }
});[/php]