in reply to dynamic update javascript & perl?

You may want to have a look at OpenThought. It's a Perl module (and framework) that lets you do the kind of things you're wanting. I haven't used it yet, but I gave it a good look-over, and here are my notes on what it does:

OpenThought allows a web page to be incrementally updated with data from the server. You can change fields on a form, e.g., without sending a whole new page.

How OpenThought works:

  1. Instead of creating a page, you create a frameset with a parent frame, an invisible communication frame and the content frame.

  2. In the content frame, you can do anything you would normally do with a normal page. In addition, to use OpenThought, you can add JavaScript calls for any event, e.g. onclick="parent.CallUrl('anopenthoughturl', form_element, ...)"

    The javascript function CallUrl in the parent frame serializes the data from the call and sends an HTTP request to an OpenThought application at the specified URL, with the communications frame given as the target for the HTTP response.

  3. The OpenThought application deserializes the data into a Perl data structure. The application can them perform any computation. It then creates instructions to modify the content frame. OpenThought transforms these to javascript and returns the results wrapped in <script></script> tags.

  4. When the communication frame receives the complete page, it executes the script, which constructs a javascript data structure, then calls a function in the parent frame. This function uses the data structure to update the document in the content frame.
It's easier to use than this might suggest.

Replies are listed 'Best First'.
Re: Re: dynamic update javascript & perl?
by andreychek (Parson) on Dec 28, 2002 at 01:59 UTC
    I couldn't have said it better myself :-)

    As a heads up, apparently some of the tests in version 0.63 of OpenThought don't work as they should. So there may be issues with the 'make test' phase of the installation. Corrections to this are currently being put in CVS, and will (theoretically) work correctly in the next release.

    Good luck!
    -Eric

    --
    Lucy: "What happens if you practice the piano for 20 years and then end up not being rich and famous?"
    Schroeder: "The joy is in the playing."