Question: With the older version of telerik, we had a snippet of code to find the number of childnodes as given below

```
function onUploadSelect(ev) {
var numberOfFiles;
if (ev.target.childNodes[1] != undefined && ev.target.childNodes[1] != null) {
    numberOfFiles = ev.target.childNodes[1].childNodes.length;
}
if ((numberOfFiles + ev.files.length) > 4) { 
//some custom validation error msgs being thrown
}
}

```

the basic logic of this code is to prevent uploading more than 4 files, 
Ex - i select 2 files,dont click on upload instead select a file again and then click on upload, I'm good(2+1<4) 
With the KEndo Uplaod, ev.target is undefined,
can you suggest a possible alternative for this?

Thanks
Adarsh

Answer: 
You have to do POST request (or DELETE to be precise) towards server where your perl script runs.

e.g.

After you get a variable set (let's say you are using jquery):

```
$.ajax({
  type: "POST",
  url: url, // where your script lives
  data: {'a' : a},
  success: function(data) {
      console.log(data);
  }
  dataType: 'json'
});

```

in your script you will then get 'a' variable from post request.
Sample scenario:

1. JS working on Your Client PC. Users selected some id.
2. JS sends selected id to server side Perl CGI script.
3. Perl parses GET request get id.
4. Perl checks if id is number not some string to hack your server.
5. Perl executes delete in MySQL.

Resourses:
JS send GET request with Param:
[HTTP GET request in JavaScript?](https://stackoverflow.com/questions/247483/http-get-request-in-javascript)

Perl Read GET Parameter
[How can I read the URL parameter in a Perl CGI program?](https://stackoverflow.com/questions/996698/how-can-i-read-the-url-parameter-in-a-perl-cgi-program)

Perl MySQL Tutorial:
<http://perl.about.com/od/perltutorials/a/perlmysql_3.htm>