Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

69
Vistas
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 la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda