in reply to Re: submit data without reload
in thread submit data without reload
thanks for the logic. it has worked for me. i really appreciate for your effort
now the problem i have. resluts come in popup window. and want to print resluts on page with no popup. i tried to change it from
to#!/usr/bin/perl # test1.pl use strict; use JSON; use CGI; my $q = new CGI; my $json = encode_json( { msg => "Time now is ".localtime } ); print $q->header( -type => 'application/json' ),$json;
#!/usr/bin/perl use JSON; use CGI; my $q = new CGI; my $json = encode_json( { msg => "Time now is ".localtime } ); print "Content-type: text/html\n\n"; print $json;
so am getting undefined as error
because if use print $q->header( -type => 'application/json' ),$json; that means its going to bring a popup window. cgi header generates popup window
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: submit data without reload
by poj (Abbot) on Jan 22, 2019 at 16:06 UTC | |
by bigup401 (Pilgrim) on Jan 23, 2019 at 11:55 UTC | |
by bigup401 (Pilgrim) on Jan 23, 2019 at 17:34 UTC | |
by poj (Abbot) on Jan 23, 2019 at 21:25 UTC | |
by bigup401 (Pilgrim) on Jan 24, 2019 at 09:24 UTC |