View Single Post
  #1 (permalink)  
Old 05-01-09, 08:07 PM
bluedogsb bluedogsb is offline
Newbie Coder
 
Join Date: Jan 2009
Posts: 31
Thanks: 0
Thanked 0 Times in 0 Posts
Image resize 'onClick' and 'changeIt()'

I'm trying to make it so when you click on this image, it will be larger:

Code:
<div>
				<script type="text/javascript">

				  function changeIt()
				  {
				  var width=640
				  var height=460

				  document.image.width=width
				  document.image.height=height
				  }

				</script>
			 
			<img src="Images/1600psDWG.gif" class="box1" name="image" align="" width="230" height="150" onclick="changeIt()"/>
</div>
The code doesn't execute. I have trouble trying to get javascript to execute for some reason whenever I try to use it.

If there is an easier way to do this function, please let me know.

Thanks in advance,
Blue
Reply With Quote