this is the classic case where AJAX fits in.
get your hands on with this jQuery tutorial
http://docs.jquery.com/Tutorials:Quick_and_Dirty_Ajax
have fun!
On May 11, 7:13 pm, globalrev <[EMAIL PROTECTED]> wrote:
> right now the program when submit is pressed will display the results
> ona new page.
>
> can someone show me a very simple way(any way just make it simple) of
> displaying this result on the same page
> without updating or going to another site.
>
> just press submit and the results is shown, either below the
> submitbutton or in the textarea, it doesnt really matter.
>
> i seriously cant find an example that shows this in an easy
> understandable way and in my other posts i cant figure it out.
>
> pseudocode is not enough. i only need to see how to take the info and
> display for real.
>
> 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>
> <body bgcolor="orange">
>
> <center>
> <h1><p><b>Robber's language encrypter/decrypter!</b></p></h1>
>
> <form method=post>
> <p>
> <select name="encdec">
> <option value="encrypt">encrypt</option>
> <option value="decrypt">decrypt</option>
> </select>
> </p>
> <textarea name="enc" rows="10" cols="50">
> </textarea>
> <p>
> <input type="submit" value="submit" /><br />
> </p>
> </form>
>
> </center>
> </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
-~----------~----~----~----~------~----~------~--~---