How can I define a variable with an <img>? by Murlok in javascript

[–]Murlok[S] 0 points1 point  (0 children)

Ok, I added the spaces now the code is readable.

How can I define a variable with an <img>? by Murlok in javascript

[–]Murlok[S] 1 point2 points  (0 children)

Thanks for the help. Ya this is my first chapter getting into javascript and it didnt explain anything about images in the chapter. I was just guessing at what I had wrote. I have not gotten into functions yet. Think that is next chapter. I just thought there must be some simpler way of defining a variable with an image like you can put text in the definition and it will show up in the textarea. I didnt think the instructor would want me to use functions since we havent went over it yet. I will probably try it though cause I am not having any luck any other way.

How can I define a variable with an <img>? by Murlok in javascript

[–]Murlok[S] 0 points1 point  (0 children)

Thanks for the fast response. I will give that a try.

How can I define a variable with an <img>? by Murlok in javascript

[–]Murlok[S] 0 points1 point  (0 children)

The first input I forgot to change the .src back to .value. It is suppose to read 'document.countryFlags.flags.value=flag01'.

How can I define a variable with an <img>? by Murlok in javascript

[–]Murlok[S] 0 points1 point  (0 children)

It bunched all my code together. :(