Online Hibernate Training just in Rs. 1000

One week online training in Hibernate ORM framework. Learn Hibernate Framework and enhance your skills. Best Online Hibernate training at 90% discount. Join Now!! Offer is valid Only for limited Period!!! Online Training Big Data and Hadoop Training Java Training  
 

Image swap on MouseOver ann Mouse out

Ads

 
 

Share on Google+Share on Google+

Aparna Acharya
Image swap on MouseOver ann Mouse out
0 Answer(s)      5 years and 4 months ago
Posted in : JavaScript Questions

I tried ur code for multiple images but didnt get the right answer...i dont want the hardcodded code...a code which is flexible with multiple images

<html>
<script language="javascript" type="text/javascript">
if(document.images) {
arr = new Array();
arr[1] = new Image();
arr[1].src = "1.jpg";
arr[2] = new Image();
arr[2].src = "2.png";
}
function swapImages(imagename, pic) {
document.images[imagename].src = arr[pic].src;
}
</script>
<a onMouseOver="swapImages('img1',1)" onMouseOut="swapImages('img1',2)" href="javascript:void">
<img name="img1"  src="1.jpg"  width="250">
</a>
</script>
Ads
View Answers
Ads









Related Tutorials/Questions & Answers:
Image swap on MouseOver ann Mouse out
Image swap on MouseOver ann Mouse out  I tried ur code for multiple images but didnt get the right answer...i dont want the hardcodded code...a code...(); arr[1] = new Image(); arr[1].src = "1.jpg"; arr[2] = new Image(); arr[2].src
Image swap on mouse over and mouse move
Image swap on mouse over and mouse move  i tried the code , sent form u...But if there are 50 images and..i want swap images on mousse over and mouse out, then the code becomes very lengthy...so please give the code for multiple
Advertisements
Image swap on mouse over and mouse move
Image swap on mouse over and mouse move  i tried the code , sent form u...But if there are 50 images and..i want swap images on mousse over and mouse out, then the code becomes very lengthy...so please give the code for multiple
Swap images oon mouse over and mouse out
Swap images oon mouse over and mouse out  I have multiple images...i want to swap each image on mouse out and mouse over..   <html>...) { arr = new Array(); arr[1] = new Image(); arr[1].src = "rose1.jpg"; arr[2] = new
Mouseover Image Dispaly
Mouseover Image Dispaly  Hi, I need HTML code for mouseover image display, when the mouse is on some text. Thanks in advance.   for this you have to use java script code by making a function
mouseover
mouseover  Sir, I have stored three images in database for one perticular item,when search is made only one image is dispaled,i want to do mouseover on that image and display other two images in popup using javascript or ajax
'append' & 'fade out/in' on mouse hover
'append' & 'fade out/in' on mouse hover In this tutorial, we will discuss about how to apply 'append' & 'fade out/in'...; is appended on it & it will fade out/in to show mouse pointing. The fadeout is set
mouseover effect
mouseover effect  Sir, I have stored three images in database for one perticular item,when search is made only one image is dispaled,i want to do mouseover on that image and display other two images in popup. please help Thanks
JAVA image zoom in/out - Framework
JAVA image zoom in/out  how to write function in java for image zoom in and zoom out using jFreeChart?  Hi Friend, Try the following... static void main(String [] args) { Chart demo = new Chart("Mouse Zoom
mouse events
mouse events  When i click a button i want to retrieve image and audio from database and play it. how can i do dis. I m using Netbeans IDE and mysql for database. pls do hel[p me
Mouse Listener
Mouse Listener  how to move any object with help of mouse but not drag it in an applet
Mouse Motion
Mouse Motion  Could you please send me the code of finding the (x,y) co-ordinates in a JFrame Compoenent..?? I need it urgently for my project
Program to swap the string
Program to swap the string  Hi, can any one tell me the code to swap the 2 strings without using temporary varibales??? Thanks a lot in advance!!   Here is an example that prompts the user to enter two string
Move Image in Java Swing
How to Move Image in Java Swing In this section, you will learn how to move an image using mouse. For this purpose, we have specified an image and using the MediaTracker class, the image is tracked by the method addImage(). The Graphics
Version of com.metaversant>share-login-ann dependency
List of Version of com.metaversant>share-login-ann dependency
Version of com.metaversant>share-login-ann dependency
List of Version of com.metaversant>share-login-ann dependency
how to use mouse pressed
how to use mouse pressed   to action mouse clicked
how to highlight the field in image,when i have entered into that corresponding field's textbox-any one help out
how to highlight the field in image,when i have entered into that corresponding field's textbox-any one help out  how to highlight the field in image... consist of a jpeg image on the top and below that image fields(text boxes) exist
Version of com.metaversant>share-login-ann-repo dependency
List of Version of com.metaversant>share-login-ann-repo dependency
Version of com.metaversant>share-login-ann-share dependency
List of Version of com.metaversant>share-login-ann-share dependency
Version of com.metaversant>share-login-ann-repo dependency
List of Version of com.metaversant>share-login-ann-repo dependency
Version of com.metaversant>share-login-ann-share dependency
List of Version of com.metaversant>share-login-ann-share dependency
mouse over effects in css
mouse over effects in css  I have written a mouse over effect in CSS. But it is not working in HTML. Can any one suggest me? Thanks
How To Move Image Smoothly
;  In this example you will see how to move image smoothly on mouse... where the MouseMotionListener interface is called to move an image on mouse... when a mouse button is pressed on the image. Then the image will dragged
How to design a mouse
How to design a mouse Follow this example to learn how to design a mouse. New File: First take a new file (Ctrl + N). Use Pen Tool (P... mouse pointer then select Direct selection tool (A key) and adjust the points
Maven Dependency share-login-ann >> 0.0.2
You should include the dependency code given in this page to add Maven Dependency of com.metaversant >> share-login-ann version0.0.2 in your project
JavaScript Zoom in and Zoom out
illustrates you how to zoom in and zoom out of an image using JavaScript. Here we... and width of the image and make it to show the effect Zoom In and Zoom Out... the image zoom in and zoom out. As long as you put the cursor on the link Zoom
mouse event - Java Beginners
mouse event  import javax.swing.*; import java.awr.*; import...=getContentPane(); setLayout(new FlowLayout()); setTitle("Mouse Event..."); public MouseEventt() { f.setLayout(new FlowLayout()); f.setTitle("Mouse
Zoom Image section using jQuery plug-in
Zoom Image section using jQuery plug-in In this section, you will learn how to zoom an image section by hovering mouse on it using jQuery. The plug-in ,we are using here, is "zoom.js". For zooming an image you must have
4D Mouse
4D Mouse       Here... mouse is an advanced species of traditional 2D mouse that can move only horizontal no vertical, while 4D mouse can move all the direction ups & down and left
image
image  how to add the image in servlet code