Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6887721
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T05:55:09+00:00 2026-05-27T05:55:09+00:00

im kinda new to javascript i mean i know the syntax but not so

  • 0

im kinda new to javascript i mean i know the syntax but not so much the libraries.

i need some help to get some files (pictures) from a folder into an arry lets say:

var[] pictures = ?;

(the folder is in my project and contain some pictures)

so i can loop over them and diplay them on the page i did some search but i didnt find any guide on how to do this.

i realy want to understand on how to do this for future projects even a link to known guid you guys know we will be a big help.

if it help im using asp.net.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T05:55:10+00:00Added an answer on May 27, 2026 at 5:55 am

    Well, there are a lot of ways to approach the problem, to me what you can do is (if you don’t know the location of the images beforehand) make a service that returns the src of every image, store that in an array, and then show them in the page.

    I believe you are using jQuery so you can make an ajax request like this:

    jQuery.ajax({
         url: /*path to*/"Service.asmx/getSources"
         //options, check documentation
    });
    

    then, from asp, make a new service (Service.asmx in my case) and create a method that returns the location of the pictures (in my case the method is called getSources)

    I recommend you use JSON (and jQuery.getJSON() method) so you can return a List<string>.

    Lastly you can iterate or store the sources in an array, I’ll put an example with the getJSON method

    var sources = []
    jQuery.getJSON("Service.asmx/getSources", function(data) {
        for(var i = 0, len = data.length; i<len ; i++) {
          sources.push(data[i]);//store every source in the array
        }
    });
    

    once you have the sources you can display them like this fiddle

    Tell me if it helped or if you need another solution.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am kinda new to this Regex thing. When analyzing some code I frequently
I am kinda new to database designing so i ask for some advices or
I've been doing some reading about two (relatively) new concepts in the Javascript language
I'm new to javascript namespaces, and I found myself kinda deep within a namespace,
this questions maybe Easy for you .. but i am new in javascript i
I am kinda new to this, but I am trying to fill an array
I'm kind of new to Javascript. Any help or suggestion regarding below problem is
I'm kinda new to using Rails, and an app I am working on is
I'm kinda new to Java, so haven't yet fully grasped the concept of multithreading.I
I'm kinda new to Flex. I have trying to send Hash from Ruby on

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.