so when i press ubmit i want to do encryption/decryption obv, how do i
connect that to the variables that need to be sent to the webpy-
mainprogram?




import web
import rob

render = web.template.render('templates/')

urls = (
  '/', 'main',
  )

class main:
    def GET(self):
        print render.main()

    def POST(self):
        i = web.input()
        if i.encdec == "encrypt":
            print rob.encrypt(i.enc)
        else:
            print rob.decrypt(i.enc)

web.webapi.internalerror = web.debugerror
if __name__ == "__main__": web.run(urls, globals())



<html>
<head>
<title>robber's language</title>
<style type="text/css">
<!--
body {
  margin: 0px;
  padding: 0px;
}
#header {
  background: #FDD017;
  width: 100%;
  height: 10%;
  font-size: xx-large;
  text-align: center;
}
#content {
  background: white;
  float: right;
  width: 100%;
  height: 90%;
  text-align: center;
}
a:link {color: black; }
a:visited {color: white; }
a:hover {color: black; }
a:active {color: black; }
-->
</style>
</head>
<body>


<script type="text/javascript">
    function myfunction()
    {
    alert("not done yet");
    }
</script>


<div id="header">
        <b>Robber's language encrypter/decrypter</b>
</div>
<div id="content">
    <textarea name = "enc" rows="10" cols="30">
    </textarea>


     <form>
    <input type="button"
        onclick="myfunction()"
    value="submit">
    </form>


</div>
</body>
</html>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web.py" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/webpy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to