View Full Version : Iframe content is not displaying correctly

11-16-2010, 06:13 PM
I have a page (http://dijkstra.cs.ttu.ee/~t093811/) and the light blue area is actually an iframe. The source is a Python CGI script, which displays a table (http://dijkstra.cs.ttu.ee/~t093811/cgi-bin/view.py) with some (pretty random) information.

As you can see, the table itself works fine, but when I look at it on the main page within the iframe, all I see is some gibberish (hieroglyphs and the like).

Any idea what might be causing this?

Also, this is the view.py scripts source:


import cgi
import cgitb
import csv

f = open("players.csv", "r")
print "Content-type: text/html"
print "<table border=\"1\" cellpadding=\"5px\" width=\"500\" style=\"margin-left:auto;margin-right:auto\">"
print "<th>Nimi</th><th>Email</th><th>Panus</th><th>M2ng</th>"
for line in f:
x = line.find(",",0,len(line))
print "<tr><td>" + line[0:x] + "</td>"
y = line.find(",",x+1,len(line))
print "<td>" + line[x+1:y] + "</td>"
print "<td>" + line[y+1:len(line)] + "</td>"
print "<td><input type=\"button\" value=\"Alusta\"></td></th>"
print "</table>"

EDIT: I now realize this might have been better suited for the CGI forum, sorry.