Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

72
Visualizações
how to set an image using a url from a data set on code.org

i have a program that takes info from a data set about birds and it will show a random bird and its info based on a random number that's generated I have everything down except the image part

I tried using

setImageURL("birdInfoImage",birdImage[index]);

in a function but an error appeared saying "setImageURL() url parameter value (undefined) is not a string"

Edit: this is for a homework assignment on code.org. The picture should be taken from the data set in the site in the "image of bird" column

var birdImage = getColumn("100 Birds of the World", "Image of Bird");

then I used bird image in a function to use the URL of the image in the data set and set that URL as the image

 onEvent("initiateButton","click",function(){
  var index = getNumber("randomNumberOutput");
  setText("birdInfoName", reducedBirdList[index]);
  setText("birdInfoScientificName", reducedBirdList[index]);
  setText("birdInfoColor", PrimaryColor[index]);
  setText("birdInfoDiet", birdDiet[index]);
  setImageURL("birdInfoImage",birdImage[index]);

hope that helped

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda