Hi all and thanks for looking,
What is the correct way to do this:
<script language="javascript">
function flag(nation)
{
this.nation=nation;
document.getElementById("flag").innerHTML="<img src='images/flags/'+nation+'.jpg'>";
}
</script>
with this in the link tags: onClick=”flag(scotislands)”; and the image name being scotislands.jpg
Many thanks,
B.
In the following line you have your string identifiers mixed up:
It should be:
EDIT
Also, as Joel spotted,
onClick="flag(scotislands)";should beonClick="flag('scotislands')";