Search code examples
htmlperluser-interfacebrowserperltk

Running a Perl/TK GUI inside a web page


We have a Perl application which contains a Perl/TK based GUI ( some checkboxes, entry fields, etc.) I have been asked to modify the Perl / TK GUI part of the application so that it can be run inside a web page. Is this possible? I found this: http://oreilly.com/openbook/webclient/ch07.html

however it appears to create a web client and parsing the HTML response to format the output, as opposed to running inside a browser. I would like to know if it is possible to somehow incorporate a Perl/TK GUI into web browser and if so what is the best way to do so? Maybe something like a plugin (ex. http://www.tcl.tk/software/plugin/)?


Solution

  • The usual way would be to rewrite your application in HTML/CSS/JavaScript. The example you show on the O'Reilly site does the opposite - it shows you how to write a Tk application that will render HTML.

    A browser plugin is possible if that will provide what you need. If that is the case then the problem is trivial, but you would need the plugin installed on every PC that needs to have access to your application, and it is possible that there are certain Tk facilities that the plugin doesn't support. All you can do is try it.