Welcome visitor
* Login
* Register
It is currently March 18th, 2019, 3:24 pm
All times are UTC [ DST ]
* Search
View unanswered posts - View active topics

FORUMS » Client Side » JavaScript



Post new topic Reply to topic  [ 2 posts ] 
Author Message
  enlarge image with javascript
PostPosted: February 11th, 2009, 2:54 am 
User avatar

Posts: 34
Hi,
can you help me to see whats wrong with this script that doesnt work?
<script type='text/javascript'>

    function enlargeImg1(){
        img1.height="420"
    }
    function dropImg1(){
        img1.height="280"
    }
</script>

<div><img src="file.jpg" height="120" name="img1" ondblclick="enlargeImg1()" onclick="dropImg1()"></div>


Top
 Profile  
 
  Re: enlarge image with javascript
PostPosted: February 11th, 2009, 3:01 am 
User avatar

Posts: 63
<script type='text/javascript'>

    function enlargeImg1(obj){
        obj.height="420"
    }
    function dropImg1(obj){
        obj.height="280'"
    }
</script>

<p><img src="file.jpg" height="120" name="img1" ondblclick="enlargeImg1(this)" onclick="dropImg1(this)"></p>

and this helps you to avoid name collision, good luck.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

FORUMS » Client Side » JavaScript


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron