Gossamer Forum
Home : General : Perl Programming :

Seeing only text in Netscape 4.08

Quote Reply
Seeing only text in Netscape 4.08
Sigh. I hate to be the hundredth person to ask this, but...

I've had dbman working for months, but havent' checked it in Navigator for several (only did it in an earlier version). Recently updated to 4.08. Suddenly, the html.pl file is only displaying text, not the HTML it should. Works fine in IE 5.5 (and earlier). Just not Navigator.

I thought there might be a missing </tr> or </table>. Copied the wonderful text listing of the source from the navigator screen, pasted it into a new HTML file, uploaded it and Voila! It displays just fine -- only not when called from dbman in the perl script. Grrr.

You can find the actual script at http://www.aatoronto.org/cgi-bin/dbmeetings/db.cgi?uid=default

One other useful note. We recently moved our site from one host server to another. The new host's tech guru speculates it may have something to do with a Mime setting in Apache at his end.

To quote: "It just occurred to me that it may be due to a missing 'mime-type' setting in my Apache. MSIE assumes
things based on file extensions (Microsoft style), whereas Netscape follows the RFCs (Unix style)."

Any additional suggestions would be welcome.

Myles White
Toronto

Quote Reply
Re: Seeing only text in Netscape 4.08 In reply to
You may be sending the wrong headers. It should be "text/html". Check that the header isn't 'text/plain'. Netscape will render this as plain text while MSIE will render it as HTML.

--Drew
Links 2.0 stuff
http://www.camelsoup.com
Quote Reply
Re: Seeing only text in Netscape 4.08 In reply to
Thanks, but I saw that in an earlier post (I did do some research in the forum before posting the question :).

I've carefully made sure that it says text/html about every way you can, with and without meta tags. The thing that has me scratching my head is that the exact text source readout netscape provides, when copied from the screen, re-uploaded to the server as a file with an html extension, works just fine. It seems to me that if the html code was flawed, it shouldn't work there, either.

mw


Quote Reply
Re: Seeing only text in Netscape 4.08 In reply to
Try using the w3c.org validator.

Installs:http://wiredon.net/gt
FAQ:http://www.perlmad.com

Quote Reply
Re: Seeing only text in Netscape 4.08 In reply to
Ohhh...

This may take a while....

Tried that earlier, running the cgi script (which of course, didn't work). Didn't think to go back again...

mw

Quote Reply
Re: Seeing only text in Netscape 4.08 In reply to
#!pathtoperl/perl

# A test :
# This prints text into Netscape .

# Uncomment this line and Netscape will see HTML
#print "Content-Type: text/html\n\n";

# This is the origional HTML code pasted in for a print statement.
print<<"(END)";

<html>
<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<table border="0" cellpadding="0" cellspacing="0" width="100%">
<p> </p>
<table border=1 bgcolor="#FFFFFF" cellpadding=5 cellspacing=3 width=500 align=center valign=top>
<tr><td colspan=2 bgcolor="navy">
<FONT FACE="MS Sans Serif, arial,helvetica" size=3 COLOR="#FFFFFF"><center><b>Greater Toronto Area AA Meetings</b></center></font></td></tr>
<tr><td><p><center><font face="verdana,arial,helvetica" size="4"><b>Main Menu</b></font>


<font face=Verdana, Arial, Helvetica size="1"><b>
Permissions:
View </b></font>
<P><font face="verdana,arial,helvetica" size="2">
Welcome to the GTA Intergroup online meeting list. You may search the
list to find any meeting in the Intergroup database, or access a form that will
allow you to send meeting list changes to the GTA Intergroup office.


<em>Enjoy!</em> and let us <a href="mailto:postmaster\@aatoronto.org">know</a> if you have any comments!


<a href="javascript:main_help()">H E L P !</a>
</font></p>
<P align=center><font face="verdana,arial,helvetica" size="2">| <A HREF="http://www.aatoronto.org/cgi-bin/dbmeetings/db.cgi?db=default&uid=default">Home</A> | <A HREF="http://www.aatoronto.org/cgi-bin/dbmeetings/db.cgi?db=default&uid=default&view_search=1">View</A> | <A HREF="http://www.aatoronto.org/meetings/change_meeting_info_form.htm">Add, Delete, or Modify</A> | <A HREF="http://www.aatoronto.org/cgi-bin/dbmeetings/db.cgi?db=default&uid=default&logoff=1">Exit Meeting Database</A> |</font></p>
<table border=0 width=100%>
<tr><td width=33%><center><img src="http://www.aatoronto.org/images/info_aa_logo2.gif" border=0 width=50 height=50 alt="AA Triangle Logo"></td>
<td width=34%><center>
<b>AA Toronto Online Meeting List</b>
</center></td>
<td width=33%><center><img src="http://www.aatoronto.org/images/info_aa_logo2.gif" border=0 width=50 height=50 alt="AA Triangle Logo"></center></td></tr>
</table>

</td></tr>
</table></center>
</body>
</html>

(END)


Quote Reply
Re: Seeing only text in Netscape 4.08 In reply to
I'm not talking about meta tags. What I mean is do you have

Code:
print "Content-type: text/plain\n\n";
where you mean:

Code:
print "Content-type: text/html\n\n";
in your program?

--Drew
Links 2.0 stuff
http://www.camelsoup.com
Quote Reply
Re: Seeing only text in Netscape 4.08 In reply to
My guess.

I don't think either are in the script.

I think he is hoping the meta tag's work in IE & NN

(-:


Quote Reply
Re: Seeing only text in Netscape 4.08 In reply to
Fixed it...

Some days I hate computers. I had, at one point, the
"Content-Type: text/html", followed by two carriage returns, inside the sub html_page_top's print qq| statement, instead of set as a separate perl line: print "Content-Type: text/html/n/n"; As soon as I took it out of the page_top and put it back where Alex had it in the first place (under sub html_print_headers), it worked.

Thanks, people...

mw

Quote Reply
Re: Seeing only text in Netscape 4.08 In reply to
That should be:

print "Content-Type: text/html\n\n";

instead of

print "Content-Type: text/html/n/n";

Installs:http://wiredon.net/gt
FAQ:http://www.perlmad.com

Quote Reply
Re: Seeing only text in Netscape 4.08 In reply to
I did spell it right in the script. Blush I also hate mornings. Wink

mw

Myles White
Toronto