Mercurial > rlmcintyre
diff BoosterPack/scripts/.svn/text-base/pjx_formDump.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_formDump.pl.svn-base Mon Sep 27 16:57:26 2010 -0400 1.3 @@ -0,0 +1,56 @@ 1.4 +#!C:/strawberry/perl/bin/perl.exe 1.5 +use strict; 1.6 +use CGI::Ajax; 1.7 +use CGI; 1.8 + 1.9 +my $q = new CGI; 1.10 + 1.11 +my $concatter = sub { 1.12 + my $str = "All Values Are <br/>\n"; 1.13 + map { $str .= ' and ' . $_ } @_; 1.14 + print STDERR $str; 1.15 + return $str; 1.16 +}; 1.17 + 1.18 +my $Show_Form = sub { 1.19 + my $html = ""; 1.20 + $html = <<EOT 1.21 +<HTML> 1.22 +<HEAD><title>CGI::Ajax Multiple Return Value Example</title> 1.23 +</HEAD> 1.24 +<BODY> 1.25 +<form> 1.26 +<input type="text" id="val1" size="6" value=2 ><br/> 1.27 +<input type="text" id="val2" size="6" value=hello ><br/> 1.28 +<input type='text' id='val3' size=6 value=34><br/> 1.29 +<input type='text' id='val4' size=8 value='something'><br/> 1.30 +<input type='text' id='val5' size=6 value='\$123.39'><br/> 1.31 +<input type='text' id='val6' size=6 value='address'><br/> 1.32 +<input type='text' id='val7' size=9 value='123 fake st'><br/> 1.33 +<input type='text' id='val8' size=9 value='some input'><br/> 1.34 +<input type='text' id='val9' size=9 value=another><br/> 1.35 +<select id='fred'> 1.36 +<option value='1234'>1234 1.37 +<option value='abcd' SELECTED >abcd 1.38 +<option value='zxyw'>zxyw 1.39 +</select> 1.40 +<br/> 1.41 +<button onclick='jsFunc(formDump(),["out"]);return false' > Send In All Form Elements </button> 1.42 +<div id="out"> 1.43 +</div> 1.44 + 1.45 + 1.46 +</form> 1.47 +</BODY> 1.48 +</HTML> 1.49 +EOT 1.50 +; 1.51 + 1.52 + return $html; 1.53 +}; 1.54 + 1.55 + 1.56 +my $pjx = CGI::Ajax->new( 'jsFunc' => $concatter); 1.57 +$pjx->JSDEBUG(2); 1.58 +$pjx->DEBUG(1); 1.59 +print $pjx->build_html($q,$Show_Form); # this outputs the html for the page