Jump to content

Welcome to Geeks to Go - Register now for FREE

Geeks To Go is a helpful hub, where thousands of volunteer geeks quickly serve friendly answers and support. Check out the forums and get free advice from the experts. Register now to gain access to all of our features, it's FREE and only takes one minute. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more.

Create Account How it Works
Photo

JAVA help (I think this is JAVA)


  • Please log in to reply

#1
fmv503

fmv503

    New Member

  • Member
  • Pip
  • 3 posts
Everything works - I just need to get this centered - have tried everything that I can think of.

Thanks for any help!! :tazz:


sub return_html {
print "Content-type: text/html\n\n";
print "<html>\n <head>\n <title>Search Results</title>\n </head>\n";
print "<body bgcolor=\"white\" link=\"black\" vlink=\"orange\">";
print "<table width=\"720\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">";
print "<tr><td><img src=\"/images/topgradient.jpg\"></td></tr>";
print "<tr><td><img src=\"/images/LogoHeader.jpg\"></td></tr>";
print "</table><font face=\"Verdana,Tahoma,Arial\">";
print "\n <center>\n <h1>Search Results</h1>\n </center>\n";
print "Below are the results of your Search:<p>\n";
print "<ul>\n";
foreach $key (keys %include) {
if ($include{$key} eq 'yes') {
print "<li><a href=\"$baseurl$key\">$titles{$key}</a>\n";
}
}
print "</ul>\n";
print "<a href=\"$title_url\">Back to $title</a>\n";
print "<table width=\"720\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">";
print "<tr><td><img border=\"0\" src=\"/images/bottomgradient.jpg\"></td></tr></table>";
print "</body>\n</html>\n";
}
  • 0

Advertisements


#2
ratmilk

ratmilk

    Member

  • Member
  • PipPipPip
  • 151 posts
did u try the align tag on your tables?
<table align=\"center\">
  • 0

#3
fmv503

fmv503

    New Member

  • Topic Starter
  • Member
  • Pip
  • 3 posts
Yes, I did try that - I must be missing something somewhere.

Easiest thing, or so I thought, was to get the results of the form search to come up centered like all the rest of the pages. I think I should be able to edit the search.pl file and everything work like a charm. I put center around the tables etc. etc. etc.

The search form is in the index page. The search.pl is in the cgi-bin (on-track so far?). The script was taken from here: Matt's Script Archive The site link is here: Webpage (if you type pcmm in the search box you will see what I mean).

Appreciate your response - any further suggestions gladly accepted!
  • 0

#4
ratmilk

ratmilk

    Member

  • Member
  • PipPipPip
  • 151 posts
why have u broken it up into several tables? You can put tables inside other tables, so just make a large table, center it, put your content in it, and thats it :tazz:

eg:
sub return_html {
print "Content-type: text/html\n\n";
print "<html>\n <head>\n <title>Search Results</title>\n </head>\n";
print "<body bgcolor=\"white\" link=\"black\" vlink=\"orange\">";
print "<table width=\"720\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">";
print "<tr><td>";
print "<table width=\"720\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">";
print "<tr><td><img src=\"/images/topgradient.jpg\"></td></tr>";
print "<tr><td><img src=\"/images/LogoHeader.jpg\"></td></tr>";
print "</table><font face=\"Verdana,Tahoma,Arial\">";
print "\n <center>\n <h1>Search Results</h1>\n </center>\n";
print "Below are the results of your Search:<p>\n";
print "<ul>\n";
foreach $key (keys %include) {
if ($include{$key} eq 'yes') {
print "<li><a href=\"$baseurl$key\">$titles{$key}</a>\n";
}
}
print "</ul>\n";
print "<a href=\"$title_url\">Back to $title</a>\n";
print "<table width=\"720\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">";
print "<tr><td><img border=\"0\" src=\"/images/bottomgradient.jpg\"></td></tr></table>";
print "</tr></td></table>";
print "</body>\n</html>\n";
}

Im not saying that this will work, but the HTML listed is pretty messy. The General idea is here.

Its also PHP not java...

Edited by ratmilk, 05 July 2005 - 05:23 PM.

  • 0






Similar Topics

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

As Featured On:

Microsoft Yahoo BBC MSN PC Magazine Washington Post HP