Hi Poet,
I probably wouldn't use eval() for this, you would be able to acheive it much easier with the
DOM.
if you changed your function to be
- Code: Select all
<script type="text/javascript">
<!--
var currentPic = "Album1";
function hot(name){
document.getElementById(currentPic).style.display = 'none';
document.getElementById(name).style.display = 'inline';
document.getElementById('mainPic').src = name + '.JPG';
currentPic = name;
}
// -->
</script>
That should work in all
DOM compatible browsers.
Cheers,