# Page code not compatible to different browsers

**URL:** <https://forum.kirupa.com/t/page-code-not-compatible-to-different-browsers/312331>\
**Category:** web dev\
**Created:** [July 30, 2010, 8:26pm UTC](https://forum.kirupa.com/t/page-code-not-compatible-to-different-browsers/312331 "2010-07-30T20:26:33Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![kklui](https://avatars.discourse-cdn.com/v4/letter/k/e5b9ba/32.png) [@kklui](https://forum.kirupa.com/u/kklui)\
**Post date:** [July 30, 2010, 8:26pm UTC](https://forum.kirupa.com/t/page-code-not-compatible-to-different-browsers/312331/1 "2010-07-30T20:26:33Z")

</div>

Hello,

I have a test page: [http://www.magicare.ca/test\_pages/team/test\_A.html](http://www.magicare.ca/test_pages/team/test_A.html)

What I want to do is:  
The bigger picture changes when cursor moves over small pictures. I used a javascript to do this. It works perfectly in browsers like Safari, Chrome. However in IE and Firefox, the small pictures appear not align with each other. Does anyone know what the problem is and how to fix it?

The script:  
\<script type=“text/javascript”\>   
function roll(img\_name1, img\_src1, img\_name2, img\_src2)   
{   
document[img\_name1].src = img\_src1;   
document[img\_name2].src = img\_src2;   
}   
\</script\>

Thanks.  
kklui.
