...

View Full Version : simple javascript help



madpeter
10-28-2006, 08:33 PM
<script>
var image = getObjByID("jimage","jimage");
image.src="./images/jscripton.jpg";
</script>

well it does not seem to do work the ID is correct and the path to set the image to.

anyideas on whats wrong and how do I fix it?

1212jtraceur
10-28-2006, 10:16 PM
It would really help if you posted a link to your complete html file rather than just this script snippet. Anyways, try something more like this:



<script type="text/javascript>
var image = document.getElementById('jimage');
image.src='./images/jscripton.jpg';
</script>


1212jtraceur



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum