jeg har lige fundet ud af at det faktisk er på iframen at popupen bliver åbnet
<?
session_start();
header("Cache-control: private");
include("funk.php");
dbconn();
?>
<script type="text/javascript">
function popup(url,name,win_height,win_width) {
pos_horizon = ((screen.width/2)-(win_width/2));
pos_vertical = ((screen.height/2)-(win_height/2));
window.open(url,name,"width="+win_width+",height="+win_height+",top="+pos_vertical+",left="+pos_horizon);
}
</script>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "
http://www.w3.org/TR/html4/loose.dtd"><html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Capok.dk/rejse</title>
<link href="style_iframe.css" rel="stylesheet" type="text/css">
</head>
<body style="margin:0px; padding:0px">
<? if($_SESSION['capok_rejse_login'] != ""){
if ($HTTP_GET_VARS[ID] == "nyhed") {
?> <table width="100%" cellpadding="0" cellspacing="5">
<tr align="left">
<th>
Overskrift
</th>
<th>
Nyhed
</th>
<th>
Billede
</th>
<th>
Oprettet
</th>
<th>
</th>
</tr>
<? $result = mysql_query("SELECT * FROM tbl_rejse_nyheder ORDER BY oprettet DESC") or die(mysql_error());
while($row = mysql_fetch_array( $result )) {
?> <tr valign="top">
<td>
<? echo $row['overskrift']; ?>
</td>
<td>
<? echo $row['nyhed']; ?>
</td>
<td>
<? echo $row['billede']; ?>
</td>
<td>
<? echo $row['oprettet']; ?>
</td>
<td>
<a href="#" onclick="popup('popup.php','mitvindue','300','300');" title="Rediger"><img src="_img/edit.png" border="0"></a>
<br><br>
<a href="#" title="Slet" onClick="return confirm('Er du sikker på at du vil slette den valgte nyhed');"><img src="_img/delete.png" border="0"></a>
</td>
</tr>
<? }
?> </table>
<? }
}
/////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////
if($_SESSION['capok_rejse_login'] != ""){
if ($HTTP_GET_VARS[ID] == "dagbog") {
?> <table width="100%" cellpadding="0" cellspacing="5">
<tr align="left">
<th>
Titel
</th>
<th>
Indhold
</th>
<th>
Oprettet
</th>
<th>
</th>
</tr>
<? $result = mysql_query("SELECT * FROM tbl_rejse_dagbog ORDER BY oprettet DESC") or die(mysql_error());
while($row = mysql_fetch_array( $result )) {
?> <tr valign="top">
<td>
<? echo $row['titel']; ?>
</td>
<td>
<? echo $row['dagbog_txt']; ?>
</td>
<td>
<? echo $row['oprettet']; ?>
</td>
<td>
<a href="#" onclick="popup('popup.php?dagbogid=<? echo $row['id']; ?>','mitvindue','300','300');" title="Rediger"><img src="_img/edit.png" border="0"></a>
<br><br>
<a href="funk.php?ID=5&dagbogid=<? echo $row['id']; ?>" title="Slet" onClick="return confirm('Er du sikker på at du vil slette den valgte post');"><img src="_img/delete.png" border="0"></a>
</td>
</tr>
<? }
?> </table>
<? }
}
?> </body>
</html>