...
:| i dnt know how, sorry.
18 Replies - 512 Views - Last Post: 11 February 2013 - 06:12 PM
#16
Re: Count divs inside div loaded from external php file
Posted 11 February 2013 - 12:40 PM
#17
Re: Count divs inside div loaded from external php file
Posted 11 February 2013 - 12:50 PM
check out the second example: http://api.jquery.com/load/
#18
Re: Count divs inside div loaded from external php file
Posted 11 February 2013 - 05:33 PM
I tried something like this 4hours ago..
However, it seems that, it's not entering the load function.
And the contents of the file is not loaded in the div.
<script type='text/javascript'>
$("#divs").load("displayFiles.php", function(){
alert($("#divs div").size());
});
</script>
include 'displayFiles.php';
However, it seems that, it's not entering the load function.
And the contents of the file is not loaded in the div.
#19
Re: Count divs inside div loaded from external php file
Posted 11 February 2013 - 06:12 PM
It works now!! 
//doing AJAX request
$(document).ready(function(){
$.ajax({
url:"displayFiles.php",
success:function(data){
// do something with the return data if you have
$("#divs").html(data);
var totalrecords= $("#divs div").size();
//function processing totalrecords
}
});
});
|
|

New Topic/Question
Reply



MultiQuote


|