Group
Extension

Matches 2

CGI-Ajax ( B/BP/BPEDERSE/CGI-Ajax-0.707.tar.gz, BPEDERSE, 2008; MetaCPAN )
CGI-Ajax/scripts/pjx_JSON_out.pl ( view source; MetaCPAN )
 
use JSON;
use Data::Dumper;

my $q = new CGI;


print $q->header(); 


my $val = $q->param('args');
my @vals = split(//, $val);


my $hash;
map { $hash->{$_} = chr(ord($_)+1) } @vals;

my $json = ob
jToJson($hash);

print "var jsonObj = $json";
CGI-Ajax ( B/BP/BPEDERSE/CGI-Ajax-0.707.tar.gz, BPEDERSE, 2008; MetaCPAN )
CGI-Ajax/scripts/pjx_JSON.pl ( view source; MetaCPAN )
<title>CGI::Ajax JSON Example</title>
<script>
  handle_return = function(vv){
    document.getElementById('object_display').innerHTML = vv; 
    eval(vv);  // this gives you 'var jsonObj' here in jav
/    alert(jsonObj); 
    var div = document.getElementById('parsed');
    div.innerHTML = "</b>key : value<b><br/>";
    for(var key in jsonObj){
      div.innerHTML += key + " => " + jsonObj[key] + 
you Enter </H2>
<form>
  Enter Number:
<input type="text" id="val1" size="6" value='abc' onkeyup="json(['val1'], [handle_return]);">
<br/><br/>The JavaScript Object:<br/>
<div id="object_display" styl

Powered by Groonga
Maintained by Kenichi Ishigaki <ishigaki@cpan.org>. If you find anything, submit it on GitHub.