0

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();
                }   
           });
2
Contributors
1
Reply
2
Views
5 Years
Discussion Span
Last Post by jogesh_p
0

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();
                }   
           });

Edited by jogesh_p: n/a

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.