Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

ajax count files in directory

Featured Replies

Hi all, i am using ajax to get objects


$.ajax({
url: 'server/php/',
type: 'get',
dataType: 'json',
error: function(data){
},
success: function(data){
 	
 alert(data);   
 var name= data.files[0]['name'];
 console.log(name);
 var size =  data.files[0]['size'];
 console.log(size);
 var url=data.files[0]['url'];
 console.log(url);
 var thumbnail_url = data.files[0]['thumbnail_url'];
 console.log(thumbnail_url);
 var delete_url = data.files[0]['delete_url'];
 console.log(delete_url);
 var delete_type = data.files[0]['delete_type'];
 console.log(delete_type);
   }
});

As You can see it will only get the first group of objects [0] how can i put a loop in for each image available

 

Thanks

Hello, please I'm try to make a block list that changes/hovers from one block to another in d same container without mouseover like the one on the www.bet.com (news container) and I don't know how to go about it. Please I will be very glad if you can help me out.

  • Author

 

if (Array.isArray(data.files)) {

    data.files.forEach(function (file) {

        console.log(file);

    });

}

Essentially, that's how you want to do it.

Pefect timing and it works great thank you +1

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.