Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1
  1. #1
    New Coder
    Join Date
    Dec 2006
    Posts
    23
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Unable to make full-filled table and no center popup window

    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 :


    Code:
    <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 :

    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
    ?>
    Last edited by ravin; 02-27-2007 at 12:43 PM.


 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •