Ignore:
Timestamp:
Nov 4, 2006, 3:32:55 PM (13 years ago)
Author:
David Sheldon
Message:

use ajax for submissions.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/npemap.org.uk/cgi/submit.fcgi

    r300 r313  
    3737REQUEST: while ($cgi = new CGI::Fast) {
    3838
    39     # If we're given return URL parameters, basic sanity check to stop
    40     # funny business
     39my $returnlink = '';
    4140   
    42     my $returnlink = '<a href="' . $returnBaseURL . '/tiles/map.html">Go back to the map</a>';   
    43 
    44     if (defined $cgi->param('easting') and ($cgi->param('easting') =~ /\d+/) and
    45         defined $cgi->param('northing') and ($cgi->param('northing') =~ /\d+/) ) {
    46         $returnlink = '<a href="' . $returnBaseURL . '/tiles/map.html#' . int($cgi->param('easting')/1000). ",".int($cgi->param('northing')/1000)  . ',1">Go back to the map</a>';
    47     }
    4841
    4942
     
    136129    if ($sth->execute($outward, $inward, $cgi->param('postcode1'), $cgi->param('postcode2'), $easting, $northing, $ENV{'REMOTE_ADDR'}, $ENV{'HTTP_USER_AGENT'})) {
    137130        print "Content-type: text/html\n\n";
    138         print "<html><head><title>Thank you</title></head>\n";
    139         print "<body><p>Thank you for telling us where your post code is!</p>\n";
    140         print "<p>$returnlink</p>\n";
    141         print $googleAnalytics;
    142         print "</body></html>";
     131        print "<p>Thank you for telling us where your post code is!</p>\n";
    143132        # Any extra actions
    144133        build_home_stats($dbh);
Note: See TracChangeset for help on using the changeset viewer.