in reply to Chatterbox on Win desktop
Grab a fresh copy of framechat so the forms target the correct window (_self) in active desktop mode.
#!perl -w # For users of framechat and active desktop, and other purposes. # Creates seven html files in script dir representing framechat's # frames. Run from shell or CGI and supply just the url at # command line or url=http://localhost/framechat.pl from CGI. use strict; use CGI ':standard'; use CGI::Carp 'fatalsToBrowser'; my$url = url(); my($uri,%i); if(@ARGV){ $uri = shift } else{ unless($ENV{'HTTP_ACCEPT'}){ print "\nPlease supply command line + arg:\n\n perl this_script.pl http://localhost/framechat.pl\n"; exit +}} BEGIN{ if($ENV{'HTTP_ACCEPT'}){ my%i = map{$_ => param($_)} param}} if($i{'url'}){ if($i{'url'}=~m|^https?://|){$uri = $i{'url'}}} if(($ENV{'HTTP_ACCEPT'}) && (!$i{'url'})){ print header(),start_html(title=>"framechat desktop setup"),p("Please +append your framechat url to the url of this script: $url<b>?url=http +://localhost/framechat.pl</b>"); exit} my%items = ( inbox => "$uri?n=inbox", chat => "$uri?n=chat", talk => "$uri?n=talk", xp => "$uri?n=xp", users => "$uri?n=users", ctrl => "$uri?n=ctrl", framechat => "$uri", ); print "Content-type: text/html\n\n<pre>" if $ENV{'HTTP_ACCEPT'}; print "\nFramechat URL = $uri\n\n"; for(keys %items){ open(FILE,"> $_.html") or die "Need write permission in the curren +t directory: $!"; print FILE qq~<html><head><meta http-equiv="refresh" content="3"; +url="$items{$_}"></head><body><a href="$items{$_}" target="_self">Loa +d $_</a></body></html>~; close(FILE) or die "$!"; if($ENV{'HTTP_ACCEPT'}){ print qq~Created <a href="$_.html">$_.html</a>\n~; } else{ print qq~Created $_.html\n~; } } print "\nDone!\n\n Now you can embed pieces of framechat\n in active d +esktop by loading these html\n pages. Framechat URL should be set to\ +n the URL of your local copy of framechat,\n while your webserver is +running.\n";
|
|---|