Mike, Here is what I am trying to do:
**** WHAT **** -) a client opens his/her browser and click on some button which triggers my plugin -) the plugin starts to communicate with a server on some URL. -) the communication between the server and the client involves a few exchanges: data from client to server, then from server to client,..... -) just for info (I do not think it's relevant to my problem) on each side (server and client) there is a smart card (that's why I need a plugin) and the information exchanged comes from/go to the smart cards -) The smart card on the server side eventually decides whether or not the smart client on the client side is OK and tells so to the cgi script which acts accordingly ***** HOW (if there's a better way let me know please) ****** As I have not found any better solution yet, I am trying to do the following (on the server there is an html file and a cgi file) -) the plugging opens the correct url which has a form with a "click" button -) the customer clicks on the button -) the server "puts" some information in a hidden form field (info from local smart card) -) the pluggin fetches the information from the form field and gives it to its local smart card ....... (this a couple of time) -) the cgi script gets the final verdict from the server smart card and acts accordingly. I hope that is clearer. Regards, Philippe Mike Meyer wrote: > "Philippe C. Martin" <[EMAIL PROTECTED]> writes: > >> PS: If my question is not clear, I am trying to "share" the form between >> the client and server. > > Yes, your question is not clear. And this statement doesn't clarify > it. That you quoted the "share" shows you are probably aware of this, > if not consciously so. > >> just as many sites out there allow you to modify existing data: >> 1) the server pops up a form with your data in it. >> 2) the client can modify it and submit. > > This doesn't really help, either. The server can't "pop up" a form; > only the client can do that. All the server can do is send data to > the client. > > The client can't modify data on the server. It can send data to the > server, but that arrives as *new* data. The server can use that to > replace old data, thus modifying that old data. > >> I know this is a _basic_ question, sorry. > > It's not clear it's a basic question, because it's not clear what > you're trying to do. > > Try answering these questions: > > Where do you expect the HTML to come from? > Where do you expect the data originally in the HTML form to come from? > Where do you expect the data the user inputs into the form to be stored? > > <mike > > >> Philippe >> >> >> >> Philippe C. Martin wrote: >> >>> Hi, >>> >>> I am trying to change the data in a form field from python. The >>> following code does not crash but has no effect as if "form" is just a >>> copy of the original html form. >>> >>> Must I recreate the form order to do that ? >>> >>> My point is for the client to be able to re-read the modified data. >>> >>> >>> Thanks, >>> >>> Philippe >>> #!/usr/bin/python >>> >>> import cgi >>> import os >>> import sys >>> import logging >>> import cgi >>> sys.stderr = sys.stdout >>> print "Content-type: text/html\n" >>> try: >>> form = cgi.FieldStorage() >>> #logging.warning (form) >>> >>> except: >>> logging.exception("\nEXCEPTION 1") >>> try: >>> >>> form['tosrv'].value = "TEST" >>> except: >>> logging.exception("\nEXCEPTION 2") >>> pass >>> >>> <html> >>> <body> >>> <title>Smart Logon</title> >>> <h1>Smart Logon</h1> >>> <hr> >>> <FORM METHOD=POST ACTION="/cgi-bin/scfbweb.py"> >>> <table> >>> <TR><TD> >>> <INPUT TYPE=HIDDEN NAME="key" VALUE="process"> >>> TO SERVER:<BR> >>> <INPUT type=text NAME="tosrv" value="TO" size=60> >>> <BR> >>> FROM SERVER<BR> >>> <INPUT type=text name="fromsrv" value="FROM" size=60> >>> <P> >>> <INPUT TYPE="SUBMIT" VALUE="START"> >>> >>> </TD></TR></table> >>> </FORM> >>> </body> >>> </html> >> > -- http://mail.python.org/mailman/listinfo/python-list