In HTML, is you use the ID attribute on a tag, it needs to be unique.
You cannot have more than 1 element with the same ID. Here you have two
elements with id='img', which is not valid HTML. Plus, if you use
javascript's getElementById() command, it can only return 1 (I am
guessing the first one it finds).
Try using different IDs on your images and calling them appropriately.
On Oct 31, 8:32 am, "Amy" <rianna...@aol.comwrote:
Gosh, most of them really. Lets say I have two identical javascripts. I
call both of them with an onload command. <script
type="text/javascript">window.onload=function(){image1();imag e2();}</script>Thing
is they both have identical other areas in the body section.
<a href="#" id="link" target="_blank"><img id="img" title="title"
border="0"></a>
<a href="#" id="link" target="_blank"><img id="img" title="title"
border="0"></a>
Since there are two identical slots to fill, the script doesn't know
what to do, and only one works. How to get around this problem?
Thankyou Amy
scriptg...@gmail.com wrote:
Amy wrote:
Hi using duplicate javascripts on the same page never work for me due
to the same property fields on the page twice. Anyone know how to get
around this? Thanks.
Can you show an example, Amy?
Val Polyakh