C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Communities   Interview   Jobs   Projects   Offshore Development    
Silverlight Tutorials | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Revenue Sharing |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...

New Feature: Community Sites: Create your own .NET community website and start earning from Google AdSense ! It's Free !




Image Zoom-in and Zoom-out Using Java Script


Posted Date: 04 Jul 2008    Resource Type: Code Snippets    Category: Javascript

Posted By: mani kumar.k.m       Member Level: Gold
Rating:     Points: 10



The example is a simple html page with an image.
The sample code uses a function zoom () called on mouseover and mouseout events on that image. Try specifying other numbers to the parameters to get a better idea of the function.


<html&RT;

<script&RT;
var nW,nH,oH,oW;
function zoom(iWideSmall,iHighSmall,iWideLarge,iHighLarge,whichImage)
{
oW=whichImage.style.width;oH=whichImage.style.height;
if((oW==iWideLarge)||(oH==iHighLarge))
{
nW=iWideSmall;nH=iHighSmall;
}
else
{
nW=iWideLarge;nH=iHighLarge;
}
whichImage.style.width=nW;whichImage.style.height=nH;
}
</script&RT;

<body&RT;
<img
border="0"
src="C:\img.gif"
width="100"
height="100"
onmouseover="zoom('47px','68px','96px','136px',this);"
onmouseout="zoom('47px','68px','47px','68px',this);"
&RT;
</body&RT;
</html&RT;




Responses


No responses found. Be the first to respond and make money from revenue sharing program.

Feedbacks      
Popular Tags   What are tags ?   Search Tags  
Javascript functions  .  Javascript  .  Image manipulation  .  

Post Feedback


This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
You must Sign In to post a response.
Next Resource: Disable back button in browser
Previous Resource: Scrolling Date in the Status Bar using Javascript
Return to Discussion Resource Index
Post New Resource
Category: Javascript


Post resources and earn money!
 
Related Resources



dotNet Slackers   BizTalk Adaptors    Web Design

silicone halloween mask

Contact Us    Privacy Policy    Terms Of Use