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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T16:09:43+00:00 2026-05-26T16:09:43+00:00

I have a proxy application retrieving ‘src’ attributes cross domain from an xml list

  • 0

I have a proxy application retrieving ‘src’ attributes cross domain from an xml list of photos.

I want to append images full size INSIDE of presized div’s so they render in a uniform size, without stretching.

I know how to append the images on their own, but I don’t know how to create a div, append the image to that element, then appendTo that div with the img to a container.

tl;dr;
Right now I have this

$("<img>").attr("src", stuff).attr('class','imgur').appendTo("#content");

Producing this:

<div id="content">
  <img />
  <img />
  <img />
  <img />
</div>

And I want this:

<div id="content">
  <div class="window"><img /></div>
  <div class="window"><img /></div>
  <div class="window"><img /></div>
  <div class="window"><img /></div>
</div>

Answer slightly modified to meet my use case:

function imgAdd(param) {
    var content = document.getElementById("content");
    var img = new Image();
    img.src = param;
    img.classList.add("imgur");
    var div = document.createElement("div");
    div.classList.add("window");
    div.appendChild(img);
    content.appendChild(div);
  }

Being fired by:

HtmlPage.Window.Invoke("imgAdd", p.src);
System.Threading.Thread.Sleep(20);
  • 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-26T16:09:44+00:00Added an answer on May 26, 2026 at 4:09 pm
    var content = document.getElementById("content");
    for (var i = 0; i < len; i++) {
      var img = new Image();
      img.src = data[i].stuff;
      img.classList.add("imgur");
      var div = document.createElement("div");
      div.classList.add("window");
      div.appendChild(img);
      content.appendChild(div);
    }
    

    May require a classList shim or a DOM shim for legacy platform support.

    If you don’t want a classList shim you can manipulate .className directly.

    .className = "string" or .className += " string"

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

Sidebar

Related Questions

i have created a application in c# i want to add proxy server how
I have exported a COM+ application proxy, which generates MSI and CAB files, and
I have a web application uses a proxy to invoke an operation on a
I have an application that is working as a proxy using QTcpSocket to intercept
I have a drag and drop handler in my Flex application. The drag proxy,
We have a reverse proxy here, running Apache in version 2.2.x Essentially I want
I am using Silverlight to interact with a proxy application that I have developed
I have an android application(Android 2.2) accessing internet behind proxy. I have tried setting
I have an application the requests a media stream from a server, however the
I have a .NET application where I instantiate a WCF proxy which is held

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.