http://qs321.pair.com?node_id=1037078


in reply to changing title of a webpage dynamically

If you want to change the title “and such” using buttons, then it is extremely probable that you will need to use JavaScript to do that.

You see, the only time that the server (i.e. Perl) would become involved, is when there is a “round-trip” involved:   the client makes an HTTP GET or POST to the server, and server replies with an HTTP response.

Most likely, everything that you want to happen ... happens entirely on the client side, start to finish.   As the most-simple example, the button could contain a onclick= handler which runs a bit of JavaScript code that changes, say, the window.title (in the browser’s own DOM model).   When the JavaScript code does that, the browser obediently repaints the screen.   The server, meanwhile, has nothing to do with it.