python, javascript and mysql

Larry Bates lbates at swamisoft.com
Fri Sep 10 09:13:24 EDT 2004


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 yahoo.com> wrote in message
news:Xns95601196933C1inderjitraiyahoocom at 66.185.95.104...
> 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