Jump to content

Recommended Posts

Hi all... Javascript noob here.  I am wondering if anyone can help me out with some code.

 

I am writing this page dynamically, that is the reason I am building it the way I am.  Basically I want to have the 100% sized image popup when a user moves his mouse over the smaller image.

 

here is my page so far... i can't get the popup to occur :/  http://interpim.com/pigs_test.php

 

code below.

 

<style type="text/css">
<!-- .a1{
position:absolute;
top: 100px;
left: 100px;
}.a2{
position:absolute;
top: 100px;
left: 250px;
}.a3{
position:absolute;
top: 100px;
left: 400px;
}.a4{
position:absolute;
top: 250px;
left: 100px;
}.a5{
position:absolute;
top: 250px;
left: 250px;
}.a6{
position:absolute;
top: 250px;
left: 400px;
}.a7{
position:absolute;
top: 400px;
left: 100px;
}.a8{
position:absolute;
top: 400px;
left: 250px;
}.a9{
position:absolute;
top: 400px;
left: 400px;
}--></style>
<div class=a1>
<img src='images/wood/DSCN0235.JPG' width=15% height=15% 
onmouseover="src='images/wood/DSCN0235.JPG' width='100%' height='100%' " 
onmouseout="src='images/wood/DSCN0235.JPG' width='15%' height='15%' " >
</div>
<div class=a2>
<img src='images/wood/DSCN0236.JPG' width=15% height=15% 
onmouseover="src='images/wood/DSCN0236.JPG' width='100%' height='100%' " 
onmouseout="src='images/wood/DSCN0236.JPG' width='15%' height='15%' " >
</div>
<div class=a3>
<img src='images/wood/DSCN0237.JPG' width=15% height=15% 
onmouseover="src='images/wood/DSCN0237.JPG' width='100%' height='100%' " 
onmouseout="src='images/wood/DSCN0237.JPG' width='15%' height='15%' " >
</div>
<div class=a4>
<img src='images/wood/DSCN0238.JPG' width=15% height=15% 
onmouseover="src='images/wood/DSCN0238.JPG' width='100%' height='100%' " 
onmouseout="src='images/wood/DSCN0238.JPG' width='15%' height='15%' " >
</div>
<div class=a5>
<img src='images/wood/DSCN0239.JPG' width=15% height=15% 
onmouseover="src='images/wood/DSCN0239.JPG' width='100%' height='100%' " 
onmouseout="src='images/wood/DSCN0239.JPG' width='15%' height='15%' " >
</div>

<div class=a6>
<img src='images/wood/DSCN0240.JPG' width=15% height=15% 
onmouseover="src='images/wood/DSCN0240.JPG' width='100%' height='100%' " 
onmouseout="src='images/wood/DSCN0240.JPG' width='15%' height='15%' " >
</div>
<div class=a7>
<img src='images/wood/DSCN0241.JPG' width=15% height=15% 
onmouseover="src='images/wood/DSCN0241.JPG' width='100%' height='100%' " 
onmouseout="src='images/wood/DSCN0241.JPG' width='15%' height='15%' " >
</div>
<div class=a8>
<img src='images/wood/DSCN0242.JPG' width=15% height=15% 
onmouseover="src='images/wood/DSCN0242.JPG' width='100%' height='100%' " 
onmouseout="src='images/wood/DSCN0242.JPG' width='15%' height='15%' " >
</div>
<div class=a9>
<img src='images/wood/DSCN0243.JPG' width=15% height=15% 
onmouseover="src='images/wood/DSCN0243.JPG' width='100%' height='100%' " 
onmouseout="src='images/wood/DSCN0243.JPG' width='15%' height='15%' " >
</div>

 

Link to comment
https://forums.phpfreaks.com/topic/168856-onmouseoveronmouseout-problems/
Share on other sites

Thanks for the help... that worked, but now I am getting a problem with the image not showing up on-top of the smaller images.

 

I have tried changing the zIndex, but it isn't working

 

<div class=a4>
<img id='big4' src='images/wood/DSCN0238.JPG' width='137px' height='103px' 
onmouseover="this.style.width='912px';this.style.height='684px'; this.style.zIndex='50'"  
onmouseout="this.style.width='137px';this.style.height='103px'; this.style.zIndex='-1'"  >
</div>

 

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.