cgi script runs under Opera, but not firefox

N

nephish

Hey there,
i have a python cgi script that prints out html just fine in the Opera
browser
but doesnt print at all under FireFox.
weird, eh?
i am getting nothing in the apache logs about any error.
perhaps its a firefox issue, but i doubt it.

any suggestions. simple script here..
 
J

James Carroll

Try View Source under Firefox, you should see everything that you're
printing from your CGI on the server. The server side CGI will do the
same thing no matter what browser is requesting the page.

Next, take that source and paste into into some app that will look for
problems like tags that aren't balanced (Dreamweaver is what I'd use.)

-Jim
 
B

Brian

Yes, I agree that it is best to check the HTML source code of the page
that is being generated. The server is obviously generating the code,
but the difference here is how the two browsers are interpreting the
HTML data.

Check the source code for the HTML document. I bet the problem resides
in the page itself.

Brian
 
N

nephish

Well, i don't have an app that will automaticlly check a page for
errors,
unless bluefish will do it, i am not sure.

the page it is supposed to print out is a response to a form entry.

here is the source from Opera if one of you guys want to look at it.

<html>
<head><title>Customer Data</title></head>

<body>
<h1>Watkins Crop Consulting</h1>
</body>
</html>
1915 Cherokee <br>
Dalhart, Tx 79022 <br> 333-5943<br>
<H3>gandalf</H3>

<span style='font-weight: bold;'>Field</span> field one

<br>
<span style='font-weight: bold;'>Crop</span> crop one

<br>
<span style='font-weight: bold;'>GS</span> growing, yep

<br>
<br>
<span style='font-weight: bold;'>Weeds</span> many weeds

<br>
<span style='font-weight: bold;'>Water</span> lots o water

<br>
<span style='font-weight: bold;'>Incects</span> lots o insects

<br>
<br>
<span style='font-weight: bold;'>Remarks</span> comment block, could be
short, could be long, however will we know?

<br>
<br>
<br>

<span style='font-weight: bold;'>Field</span> another field

<br>
<span style='font-weight: bold;'>Crop</span> another crop

<br>
<span style='font-weight: bold;'>GS</span> another growth stage

<br>
<br>
<span style='font-weight: bold;'>Weeds</span> many many weeds

<br>
<span style='font-weight: bold;'>Water</span> lots more water

<br>
<span style='font-weight: bold;'>Incects</span> lots more insects

<br>
<br>
<span style='font-weight: bold;'>Remarks</span> ok , short comment this
time

<br>
<br>
<br>
<br>


this is all generated by the cgi module of python and the script that
responds to the
form.

thanks.
 
B

Brian

Bingo, found it! Notice that you accidentally close the document before
displaying any information...


<html>
<head><title>Customer Data</title></head>

<body>
<h1>Watkins Crop Consulting</h1>
</body>
</html>


<snip> Notice the </body></html> tag above. There's the problem!

Brian
 
N

nephish

Ok, i made a change in the source. now here is the source from Opera,
still cant get firefox to work with me.

<html>
<head><title>Customer Data</title></head>

<body>
<h1>Watkins Crop Consulting</h1>
</body>

1915 Cherokee <br>
Dalhart, Tx 79022 <br> 333-5943<br>
<H3>gandalf</H3>

<span style='font-weight: bold;'>Field</span> field one

<br>
<span style='font-weight: bold;'>Crop</span> crop one

<br>
<span style='font-weight: bold;'>GS</span> growing, yep

<br>
<br>
<span style='font-weight: bold;'>Weeds</span> many weeds

<br>
<span style='font-weight: bold;'>Water</span> lots o water

<br>
<span style='font-weight: bold;'>Incects</span> lots o insects

<br>
<br>
<span style='font-weight: bold;'>Remarks</span> comment block, could be
short, could be long, however will we know?

<br>
<br>
<br>

<span style='font-weight: bold;'>Field</span> another field

<br>
<span style='font-weight: bold;'>Crop</span> another crop

<br>
<span style='font-weight: bold;'>GS</span> another growth stage

<br>
<br>
<span style='font-weight: bold;'>Weeds</span> many many weeds

<br>
<span style='font-weight: bold;'>Water</span> lots more water

<br>
<span style='font-weight: bold;'>Incects</span> lots more insects

<br>
<br>
<span style='font-weight: bold;'>Remarks</span> ok , short comment this
time

<br>
<br>
<br>
<br>
</html>

maybe there is another place i have gakked up the source.
 
D

Dennis Lee Bieber

Ok, i made a change in the source. now here is the source from Opera,
still cant get firefox to work with me.

<html>
<head><title>Customer Data</title></head>

<body>
<h1>Watkins Crop Consulting</h1>
</body>

THIS is in the wrong location... You've just told a decent
browser that this is the end of the displayable content.
1915 Cherokee <br>
Dalhart, Tx 79022 <br> 333-5943<br>
<H3>gandalf</H3>

<span style='font-weight: bold;'>Field</span> field one

<br>
<span style='font-weight: bold;'>Crop</span> crop one

<br>
<span style='font-weight: bold;'>GS</span> growing, yep

<br>
<br>
<span style='font-weight: bold;'>Weeds</span> many weeds

<br>
<span style='font-weight: bold;'>Water</span> lots o water

<br>
<span style='font-weight: bold;'>Incects</span> lots o insects

<br>
<br>
<span style='font-weight: bold;'>Remarks</span> comment block, could be
short, could be long, however will we know?

<br>
<br>
<br>

<span style='font-weight: bold;'>Field</span> another field

<br>
<span style='font-weight: bold;'>Crop</span> another crop

<br>
<span style='font-weight: bold;'>GS</span> another growth stage

<br>
<br>
<span style='font-weight: bold;'>Weeds</span> many many weeds

<br>
<span style='font-weight: bold;'>Water</span> lots more water

<br>
<span style='font-weight: bold;'>Incects</span> lots more insects

<br>
<br>
<span style='font-weight: bold;'>Remarks</span> ok , short comment this
time

<br>
<br>
<br>
<br>

</html>

maybe there is another place i have gakked up the source.

--
 
N

nephish

fixed, thanks for all of your help.
i am pouring over python texts and the problem is
html... duh....

looking for a more efficient way to jerk all of the hair outta my head.


thanks a whole lot. your awesome
 
M

Mike Meyer

fixed, thanks for all of your help.
i am pouring over python texts and the problem is
html... duh....

Right. To get HTML that will work in any browser, <URL:
http://www.anybrowser.org/campaign/ >, you really need to validate
your HTML. w3.org provides a public validator at <URL:
http://validator.w3.org/ > (as well as validators for CSS, RDF, XML
Schema and link checking). If you're going to be doing a lot of work
with such formats, you probably want to install a validator
locally. Lots of options for that, depending on what kind of system
you're using.

BTW, practical experience is that you write your application to follow
the standards, then go back and work around the bugs in various
versions of IE.

<mike
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,731
Messages
2,569,432
Members
44,832
Latest member
GlennSmall

Latest Threads

Top