python, javascript and mysql

Phil Frost indigo at
Fri Sep 10 15:34:09 CEST 2004

Also, if you output the table as HTML and give an element an 'id' or
'name attribute, then you can find that elemente in javascript and
examine its contents. Take a look at
<> for
all the nifty things javascript can do with an HTML document. Also, has much other interesting javascript on it.

On Fri, Sep 10, 2004 at 08:13:24AM -0500, Larry Bates wrote:
> The answer is that you can do it either way.
> You can have python create JavaScript that creates
> a variable (normally an array) that contains the
> values and then have a JavaScript function that
> builds the table via DOM or you can just create
> the entire page using Python (as HTML) on the
> server and send it.  All depends on exactly how
> the application needs to act and if you are
> comfortable with JavaScript client programming.
> Larry Bates
> Syscon, Inc.
> "someguy" <inderjitrai at> wrote in message
> news:Xns95601196933C1inderjitraiyahoocom at
> > Hi all!
> >     I'm new to python so i'm hoping someone could help me out.  I'm
> > trying to use python for cgi.  I have a page with pictures along the sides
> > and a table in the middle.  The pictures on the side change using
> > javascript.  What I want to do is populate that table by getting the
> > records from mySql using python and then somehow populate my table on the
> > page with these values.  How do i pass these values from python back to
> > javascript?  Or do i have to generate the whole html code again in the cgi
> > file?
> >
> > Thanks in advance

More information about the Python-list mailing list