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 8681787
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T21:36:01+00:00 2026-06-12T21:36:01+00:00

I have a problem I could need some help with. I am working on

  • 0

I have a problem I could need some help with. I am working on a personal webpage containing large amounts of images and videos. The markup is strictly HTML, and it is styled using CSS.
I also have one or two Javascripts running. I finished my first page the other day, and just realized that I have to manually add around 20-30 images/videos to each page(I am hoping to build around 10-15 pages), and thought that perhaps there is some script available that can simplify my task to upload all my media content. Keep in mind that all the pages will look the same, so a script would really make things easier.

Here is what I had in mind. I thought I could create two folders, add all the images and videos to each of them.

Then use Javascript to iterate through all of the content, adding them into my already built HTML page.

Is this possible? If so, please notify my how I can obtain this solution.

I dont know javascript well enough to code myself so I would appreciate complete solutions.

Here is the HTML

<ul>
 <li><iframe width="420" height="345"src=""
</iframe></li>
</ul>

<ul>
<li><a href="#"><img src="" width=100 height=100/></a></li>
</ul>
  • 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-06-12T21:36:02+00:00Added an answer on June 12, 2026 at 9:36 pm

    A javascript only solution would be to use naming conventions and let javascript assume that there should be an item with a specific name.

    One example would be:

    Rename your files:

    PageName_1.jpg, PageName_2.jpg, PageName_3.jpg, PageName_1.flv, ...

    The downside is that you’ll have to define parameters about what types (extensions) of files to look for as well as how many of each type to look for on each page.

    var files = {'jpg':3, 'flv':1, ...};
    var pageName = "PageName";
    

    Once you have that set up, you can iterate over the object:

    for (var ext in files){
        for (var i = 0; i < files[ext]; i++){
            var src = "images/" + pageName + "_" + (i+1) + "." + ext;
            ...
        }
    }
    

    If you want more than just images, you’ll have to create some logic to determine what type of element to generate. The best way to go about this is generally a factory method:

    function generateElement(src, ext){
        switch(ext){
            case 'jpg':
                ...
            break;
            case 'flv':
                ...
            break;
        }
    }
    

    Then again, you could just make your life easier and use server-side functionality.

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

Sidebar

Related Questions

i have a problem. Some sql in my program could be written by the
wonder if someone could help me with a little problem. I have session values
Ok been working with WPF for a while but I need some help. I
i need some help with c# and nhibernate. I'm working on a project that
I need some help to have a widget work correctly in a web2py app.
i need some help to solve my problem. I've got 2 input field with
I am in need for some help as I am stuck with a problem
i have this problem: ms-access could not delete and i found a potential solution
I have a strange problem that I could not solve. When I try to
I have a problem for querying records into mysql explanation below The user could

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.