I have created a python script that gets and returns the size of files with given start&end date params. I have written function for a check box that when clicked it displays a hidden field. In this hidden field I would like the size of the files to be displayed. I have attempted to write a get function in order to run the function on click, but nothing.

I understand that I have to use AJAX, but I have little to no knowledge on this and very little on JavaScript.

Any help would be greatly appreciated..

$('#hidden').hide(); 
            $('#getfiles').click(function() {
                if(this.checked) {
                    $('#hidden').show({
                        $.get('views/ajax', function(getSize) {
                            $('#hidden').click(getSize)
                });
                } else {
                    $('#hidden').hide();
                }   
           });

the question is not exactly clear
this will help you to understand $.get Request
http://api.jquery.com/jQuery.get/

i don't know if there is any checkbox in your script,,,
have to paste html part also >>

$('#hidden').hide(); 
            $('#getfiles').click(function() {
                if( $('input[name=checkbox_name]:checked') ) {
                    $('#hidden').show({
                        $.get('views/ajax.py', function(getSize) {
                            $('#hidden').click(getSize)
                });
                } else {
                    $('#hidden').hide();
                }   
           });
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.