Dynamically Refreshed Pages produced by Python
Update img.src attribute in onsubmit() handler.

img.src url points to your Python script that should generate an image in response.
onsubmit() for your form could be registered and written using JQuery.
I've been researching this on and off for a number of months now, but I am incapable of finding clear direction. 
My goal is to have a page which has a form on it and a graph on it. The form can be filled out and then sent to the CGI Python script (yeah, I'll move to WSGI or fast_cgi later, I'm starting simple!) I'd like the form to be able to send multiple times, so the user can update the graph, but I don't want the page to reload every time it doe that. I have a form and a graph now, but they're on separate pages and work as a conventional script.
I'd like to avoid ALL frameworks except JQuery (as I love it, don't like dealing with the quirks of different browsers, etc). 
A nudge in the right direction(s) is all I'm asking for here, or be as specific as you care to. 
(I've found similar guides to doing this in PHP, I believe, but for some reason, they didn't serve my purpose.)
EDIT: The graph is generated using Flot (a JQuery plugin) using points generated from the form input and processed in the Python script. The Python script prints the Javascript which produces the graph in the end. It could all be done in Javascript, but I want the heavier stuff to be handled server-side, hence the Python.
Thanks!