diff BoosterPack/scripts/.svn/text-base/pjx_url.pl.svn-base @ 0:0d795f02a8bb tip

initial committ. what was I thinking?
author Robert McIntyre <rlm@mit.edu>
date Mon, 27 Sep 2010 16:57:26 -0400
parents
children
line wrap: on
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/BoosterPack/scripts/.svn/text-base/pjx_url.pl.svn-base	Mon Sep 27 16:57:26 2010 -0400
     1.3 @@ -0,0 +1,43 @@
     1.4 +#!C:/strawberry/perl/bin/perl.exe
     1.5 +
     1.6 +# this is an example script of how you would use URLs to define
     1.7 +# your CGI::Ajax functions.
     1.8 +
     1.9 +use strict;
    1.10 +use CGI::Ajax;
    1.11 +use CGI;
    1.12 +
    1.13 +my $q = new CGI;
    1.14 +
    1.15 +# the format here implies that 'convert_degrees.pl' is at the same
    1.16 +# level in the web server's document root as this script.
    1.17 +my $pjx = CGI::Ajax->new( 'myfunc' => 'convert_degrees.pl');
    1.18 +$pjx->JSDEBUG(1);
    1.19 +
    1.20 +my $Show_Form = sub {
    1.21 +  my $html = "";
    1.22 +  $html .= <<EOT;
    1.23 +<HTML>
    1.24 +<HEAD><title>CGI::Ajax Outside URL Example</title>
    1.25 +</HEAD>
    1.26 +<BODY>
    1.27 +<form>
    1.28 +  Degrees Centigrade:&nbsp;
    1.29 +  <input type="text" name="val1" id="val1" size="6"
    1.30 +    onkeyup="myfunc( ['Centigrade__' + getVal('val1')], ['val2'] );
    1.31 +    return true;">
    1.32 +  <br/>
    1.33 +
    1.34 +  Degrees Kelvin:&nbsp;
    1.35 +  <input type="text" name="val2" id="val2" size="6"
    1.36 +    onkeyup="myfunc( ['Kelvin__' + getVal('val2')], ['val1'] );
    1.37 +    return true;">
    1.38 +</form>
    1.39 +</BODY>
    1.40 +</HTML>
    1.41 +EOT
    1.42 +
    1.43 +  return $html;
    1.44 +};
    1.45 +
    1.46 +print $pjx->build_html($q,$Show_Form); # this outputs the html for the page