|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
I am putting together a website for a photographer friend, and he would like a description (one or two sentences) displayed when the mouse moves over a thumbnail. He wants this description to appear in the bottom left corner of the screen with the thumbnails to the right of this. As there will be about 20+ thumbnails per category, i've had to make this a separate frame. So, my question is:
How can I display text is a different frame when the mouse passes over an image? I can do it in the same frame using something like <SCRIPT LANGUAGE = "JavaScript"> /* Show an object */ function showObject(object) { object.visibility = VISIBLE; } /* Hide an object */ function hideObject(object) { object.visibility = HIDDEN; } </SCRIPT> and later on <a href= ... onmouseover="showObject(desc1)" onmouseout="hideObject(desc1)"> ... </a> (That's using an IE style class for the desc, Navigator I deal with as /* Simple version detection */ var isNS = (navigator.appName == "Netscape" && parseInt(navigator.appVersion) >= 4); /* They can be used in place of hidden and visible because on occasion Navigator has problems with the two */ var HIDDEN = (isNS) ? 'hide' : 'hidden'; var VISIBLE = (isNS) ? 'show' : 'visible'; /* Create shortcut variables for different absolutely positioned elements */ var desc1 = (isNS) ? document.desc1 : document.all.desc1.style; etc. ) Is there a simple variation on these themes that I can use, or do I need a total re-write? ------------------ J K-C |
|
#2
|
|||
|
|||
|
this worked for me:
suppose the frame that you wanted to load s called "one" and the html page you want to load into that frame is called one.html. onMouseOver="parent.one.location='one.html'" |
|
#3
|
|||
|
|||
|
Unfortunately, that will require you to have a page for each thumbnail, although this could be overcome using a large page with an anchored area for each thumbnail:
onMouseOver="top.frames[1].location.href='page.htm#picnum'" I've been thinking about this though, and I'm wondering if you could use document.write? I'm not though, JavaScript security might prevent it. Try this: onMouseOver="top.frames[1].document.write('Text to be displayed here'); return true" adam |
![]() |
| Viewing: Dev Shed Forums > Web Design > HTML Programming > Displaying text in another frame on mouseover |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|