CGI / Frames question

Sandy Norton sandskyfly at
Sun Aug 18 08:57:28 EDT 2002

Hi folks,

I have an  html frameset with two sections: a top section (where I put
content) and a bottom section (which is like a control bar).

I've set up a python cgi script which dispatches commands from the
control frame and shows the results in the content frame. 

It just occured to me to collect some simple information from the
content  frame, but I don't have any idea how to pass that information
to the script.

Here's some simplified code which illustrates the problem:

<frameset rows="*,45" frameborder="NO" border="0" framespacing="0"
  <frame name="mainFrame" src="content.html">
  <frame name="bottomFrame" scrolling="NO" noresize

<form action="cgi-bin/" method="get" name="news_list">
      <input type='checkbox' name='news_article' value="a">
	     <a href=''>article 1</a>
      <input type="submit" name="submit_a" value="submit_a">

<form name="control" method="get" action="cgi-bin/"
      <input type="submit" name="submit_b" value="submit_b">


import cgi, cgitb; cgitb.enable()
print "Content-Type: text/plain\n\n"
form = cgi.FieldStorage()
for name in form.keys():
    print "Input: " + name + " --> " + form[name].value + "\n"
print "Finished!"
from CGIHTTPServer import test as serve
if __name__=='__main__': serve()

What I specifically would like to do is have the user click on
'submit_b' from the control frame (control.html) and pass on the
differences in state from _both frames_ to the python cgi script. It
would be as if both 'submit_a' and 'submit_b' were somehow pressed

Is this possible?

Any help would be much appreciated,



More information about the Python-list mailing list