Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Styling CGI-scripts

Status
Not open for further replies.

eteng

Technical User
May 21, 2003
1
SE
I apologise if a newbie question like this is unwarranted here. I'm primarily a designer, not a programmer.

I've been browsing dozens of CGI-related sites and fora by now, and virtually all describe how to install a CGI-scripted search engine as well as instructions on how to customize the search page (always a HTML-file, and a piece of cake). None even mentions styling the results page (always a CGI-file).

I have this simple search engine [] which I want to integrate seamlessly on a website of mine, meaning I want the results page to contain all graphics and objects that are present on my other pages.

I'd be most grateful if anyone could outline how I integrate Javascripts and complex HTML into the code, as well as how I attach a CSS-file. The CGI-file in question can be found at:
A nod in the right direction would do the trick. Even a book tip would be sufficient, as I can't seem to find anything written for designers on how to integrate/customise/style prefabricated CGI-scripts to make them blend with a graphic design and interface.

Thank you in advance.
 
This is where your html editing should go....
sub return_html {
print "Content-type: text/html\n\n";
print &quot;<html>\n <head>\n <title>Results of Search</title>\n </head>\n&quot;;
print &quot;<body>\n <center>\n <h1>Results of Search in $title</h1>\n </center>\n&quot;;
print &quot;Below are the results of your Search in no particular order:<p><hr size=7 width=75%><p>\n&quot;;
print &quot;<ul>\n&quot;;
foreach $key (keys %include) {
if ($include{$key} eq 'yes') {
print &quot;<li><a href=\&quot;$baseurl$key\&quot;>$titles{$key}</a>\n&quot;;
}
}
print &quot;</ul>\n&quot;;
print &quot;<hr size=7 width=75%>\n&quot;;
print &quot;Search Information:<p>\n&quot;;
print &quot;<ul>\n&quot;;
print &quot;<li><b>Terms:</b> &quot;;
$i = 0;
foreach $term (@terms) {
print &quot;$term&quot;;
$i++;
if (!($i == @terms)) {
print &quot;, &quot;;
}
}
print &quot;\n&quot;;
print &quot;<li><b>Boolean Used:</b> $FORM{'boolean'}\n&quot;;
print &quot;<li><b>Case $FORM{'case'}</b>\n&quot;;
print &quot;</ul><br><hr size=7 width=75%><P>\n&quot;;
print &quot;<ul>\n<li><a href=\&quot;$search_url\&quot;>Back to Search Page</a>\n&quot;;
print &quot;<li><a href=\&quot;$title_url\&quot;>$title</a>\n&quot;;
print &quot;</ul>\n&quot;;
print &quot;<hr size=7 width=75%>\n&quot;;
print &quot;Search Script written by Matt Wright and can be found at <a href=\&quot; Script Archive</a>\n&quot;;
print &quot;</body>\n</html>\n&quot;;
}




haunter@battlestrata.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top