Delphi WebBroker and jquery AJAX

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<meta content="text/html; charset=utf-8" http-equiv="content-type"/>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">

<script src="../js/jquery.min.js"></script>



// This jquery function can get image src string from server and show image.
$.get("titlepic?imgNo=1", function(data,status){
$('#img1').attr("src", data);



<title> </title>



<div id="banner">
<img src="../1.jpg" / class="banner-img">

<div class="thumbnail">
<img id="img1" class="title-img" />




WebBroker code:

procedure TWebModule1.WebModule1WebActionTitlepicAction(Sender: TObject;
Request: TWebRequest; Response: TWebResponse; var Handled: Boolean);
Id, PicName: string;
i: Integer;
Id := Request.QueryFields.Values['ImgNo'];

i := 0;
TryStrToInt(Id, i);
case i of
0: PicName := '0.jpg';;
1: PicName := '2.jpg';
2: PicName := '3.jpg';
3: PicName := '4.jpg';
4: PicName := '5.jpg';

Response.Content := FUploadImagePath + PicName;