I'm new here and new to JavaScript. There's a thing I would need for my website: I want to include an image from an other site. But it's url is changing every day because the image changes every day.
(That's the site: http://apod.nasa.gov/apod/)
How can I find out the image url with javascript and show it on my website?
You can do this, but maybe you shouldn't? That page has a disclaimer about image permissions: http://apod.nasa.gov/apod/lib/about_apod.html#srapply
which specifically doesn't allow unlimited reproduction. I admit that it's very unlikely that you will have any legal trouble with this, but it's not considered good form to run other people's content on your site without permission.
Indeed, I referred to other NASA-Websites where the images aren't protected with copyright and everybody is allowed to use them as often and where ever they want if they quote NASA.
Indeed, I referred to other NASA-Websites where the images aren't protected with copyright and everybody is allowed to use them as often and where ever they want if they quote NASA.
Maybe. But inserting in your page an absolute url to a picture which belongs to another domain is not recommended. Don't confound the rights to use a picture with the rights to insert a link to that picture.
You should rather use a server-side code to load that picture into your domain and use it from your domain. Of course, mentioning who is the owner, and the rest of courtesy, etc.
Bookmarks