I have a script that does reload
every 10 seconds, loading a page into a div
:
<script type="text/javascript">
var tempo = 10000;
function listar() {
$.ajax({
url:"lista.php",
success: function (textStatus) {
$('#lista').html(textStatus);
}
});
}
function reload() {
location.reload();
}
$(function() {
listar();
setInterval(listar, tempo);
setInterval(reload, 1800000);
});
</script>
I would like the script , to recognize the screen type / size (monitor, cell, etc.), and upload the file for size.
Example:
When the screen is a monitor : list.php
When the screen is a cell : upload_list.php