Hi
I have a school project, we have to create a website the requirement is that we have to use external js file.
So far I just found the solution of doing a rollover thingy that is not generated by dreamweaver [one of requirements too].
So here’s the code i got:
on the HEAD tag:
<script type=“text/javascript”>
function swapPictures(id,URL) {
document.getElementById(id).src= URL;}
</script>
heres on the body: [I have 5 buttons actually, but I only show 2]:
<a href = “javascript:void(0);”
onMouseOver = “swapPictures(‘swapA’ , ‘…/images/menuing/a_over.jpg’); return false;”
onMouseOut = “swapPictures(‘swapA’ , ‘…/images/menuing/a_normal.jpg’); return false;”><img src="…/images/menuing/a_normal.jpg" class=“picNoBorder” id=“swapA”></a>
<a href = “javascript:void(0);”
onMouseOver = “swapPictures(‘swapB’ , ‘…/images/menuing/b_over.jpg’); return false;”
onMouseOut = “swapPictures(‘swapB’ , ‘…/images/menuing/b_normal.jpg’); return false;”><img src="…/images/menuing/b_normal.jpg" class=“picNoBorder” id=“swapB”></a>
My question is… is there anyway to use external javascript for doing this?
It’s already way over my head now… but it’s really fun, never thought of doing script like this could be this fun
Thanks