Jump to content

[SOLVED] javascript show/hide iframe help


pleek

Recommended Posts

hello everybody,

 

ok i have recently started a website but im running into some probs. My homepage is www.craigh.tlcrepair.net

 

everything i have wanted to do so far i have been able to (or learn how to do) except my vid main page.

http://craigh.tlcrepair.net/pages/video.html

i want the description <iframe> to show up when the user puts the mouse over the name, and hide again after 2 seconds of the mouse being moved

<head>
<script type="text/javascript">
function hide1()
{
    num1.style.visibility="hidden"; 
    }
function show1()
{
    num1.style.visibility="visible"; 
    }
</head>
<body>
<p><a href="pagename.html" onmouseover="show()" onmouseout="hide()">number1</a></p>
</body>

 

Ok, this script works pretty much perfectly but i have a couple problems.

 

First, when u mouse over the second name http://craigh.tlcrepair.net/pages/video.html the second and third iframes both show. Once u mouseout they both "hide" and then the whole script works fine. Whats wrong?

 

Second i'd like to compact the script with var so that i don't have to write the same script 10 times with just a different id for the iframe.

 

I know how to set a "set time out" to delay the hiding of the frame so i don't really think i need help with that but the other part is stumping me.

 

Can anybody help me out here?

Link to comment
Share on other sites

so ur sayin that if i just position a div like this

 

<div id="div id" "position: absolute; left:number; top:number;">
<table>
     <tr>
         <td>
             <img src="path to file.gif">
         </td>
         <td>
              <p>discription</p>
         </td>
      </tr>
</table>

then call the javascript function like normal??

Link to comment
Share on other sites

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.