...

View Full Version : Unable to make full-filled table and no center popup window



ravin
02-27-2007, 12:23 PM
Hi,

Im trying to get 2 things working,

First problem;

When the print <<<EOC line executes, i get a long simple list with $rcserver links...
I really want it to be a fullfilled table, with linebreak after table width="750" is this possible?

Second problem ;
The popup window does not center screen, i know there is a script for this :



<SCRIPT LANGUAGE="JavaScript">
<!--

function launchCenter(url, name, height, width) {
var str = "height=" + height + ",innerHeight=" + height;
str += ",width=" + width + ",innerWidth=" + width;
if (window.screen) {
var ah = screen.availHeight - 30;
var aw = screen.availWidth - 10;

var xc = (aw - width) / 2;
var yc = (ah - height) / 2;

str += ",left=" + xc + ",screenX=" + xc;
str += ",top=" + yc + ",screenY=" + yc;
}
return window.open(url, name, str);
}

var win = launchCenter('center.html', 'center', 220, 440);

// -->
</SCRIPT>

Is it possible to use this script in my source?

Here is my php source code :


<center>
<table border="0" rules="groups" width="750" cellspacing="0" cellpadding="2" class="white">
<?php
$sql = "SELECT * FROM `categories` WHERE 1 AND NOT `server`=''" ;
$result = dbQuery($sql) or error("$lang[cant_sql]: $sql</p><p>$lang[mysql_said]:<br>".mysql_error()."</p><p>$lang[contact_webmsater] $settings[webmaster_mail]");
$options='';
$i=1;

while ($mycat=dbFetchAssoc($result))
{
if ($i) {$color="admin_gray"; $i=0;}
else {$color="admin_gray"; $i=1;}

/* Deleting category with ID 1 (default category) is not allowed */
if ($mycat['id'] == 1)
{
$rcserver="&nbsp;";
}
else
{
$rcserver="<a href=\"javascript:void(window.open('http://ts.server.se/tsweb/default.htm?AutoConnect=1&Server=$mycat[server]&FS=1','TsWeb','width=670, height=540, location=no, menubar=no, status=no, toolbar=no, scrollbars=no, resizable=no, top=70'))\"><img src=\"images/server.jpg\" border=\"0\">$mycat[name] ($mycat[server])</a>";
}

$options .= "<option value=\"$mycat[id]\">$mycat[name]</option>\n";

print <<<EOC
<tr>
<td align="left" nowrap>$rcserver</td>
</tr>

EOC;
} // End while
?>



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum