PDA

View Full Version : complex rollover?


DagGz
August 9th, 2002, 12:38 AM
hi i am building a website and i want to be able to create a different sort of rollover than the bog standard one. by this i mean.....hovering over some text and for a picture to be displayed somewhere else on the page. is this possible??? i have seen it before but dont know if they did it using rollovers or something else...if there is another way then can you please tell me.

this is the website i am currtently designing

www.sublo.tk

the empty area on the left is where i want the pictures displayed and the test is the links to the other pages.

thanks in advance!! ;)

Steven.Bentley
August 9th, 2002, 04:26 PM
Quite possible :)

You can make a mouseover event on one image change a picture on another part of the page like this:

This is the one you mouseover...

<a href="#" onmouseover="document.rollovertarget.src='pic2.jpg'" onmouseout="document.rollovertarget.src='pic1.jpg'"><img src="pic3.jpg"></a>

and this is the one that gets changed...

<img src="pic1.jpg" name="rollovertarget">

DagGz
August 10th, 2002, 10:49 PM
ta matie, i tried ur code and it worked to an extent but noy how i wanted it to, so i made some ammendmants, took a while but i did it. heres the ammanded coding:

<onMouseOut="MM_swapImgRestore()" <a href="index.html" onMouseOver="MM_swapImage('home','','images/home.jpg',1)">
<img name="home" border="0" src="images/blank1.jpg" width="239" height="99"></a>

hope this code can help somone else.............:)

1 more question now....;)

the website is for my "drum and bass kru" there is about 8 of us....some DJ some MC....but thats irrelavant really.....we record mixes to be streamsed form the page....i got that bit workin ok....but i want the media window to be displayed as a pop up and without and of the IE butons on top or the address bar.....how do i do this???

cheers

DagGz

degsy
August 11th, 2002, 12:19 AM
<onMouseOut="MM_swapImgRestore()" <a href="index.html" onMouseOver="MM_swapImage('home','','images/home.jpg',1)">
<img name="home" border="0" src="images/blank1.jpg" width="239" height="99"></a>


You have some invalid coding in there.
<onMouseOut="MM_swapImgRestore()" is not associated with anything.


--------
Popup Window

<script>
function popup(url,width,height)
{
popup=window.open(url,'popup','width='+width+',hei ght='+height+',left=20,top=20toolbar=0,location=0, directories=0,menubar=0,scrollbars=1,resizable=1') ;
}
</script>


<a href="javascript:popup('http://www.google.com',500,300)">popup</a>

Silver Rabbit
August 11th, 2002, 12:05 PM
For your roll over image opening somewhere else:
You help me with that one degsy
:D

Look at my old thread here: A bit near the end of the thread:

http://www.cybertechhelp.com/forums/showthread.php?s=&threadid=8753

DagGz
August 11th, 2002, 06:52 PM
You have some invalid coding in there.
<onMouseOut="MM_swapImgRestore()" is not associated with anything.


it is i valid i think because i tried takin it out and whenever i hovered the cursor over the button it froze on the rollover picture.....i think that bit of coding tells it to go back to the original pic. even if it is irrelavant them im leavibn it cuz i got it to work good now and i dont wanna mess things up :)

about the popup.......the coding dont seem to work i just get syntax errors. i copied and pasted the coding so there must be somink up with it. any way of doin the popup window using html instead of java?

Silver Rabbit
August 11th, 2002, 07:24 PM
I put this in the wronge form :D

degsy
August 11th, 2002, 07:38 PM
Just the forum playing up.

View the source on this page:
http://www.degs.co.uk/test/javascript/popup_window.htm

LTU0105
August 19th, 2002, 09:32 PM
Here is a great site that, teaches you how to write complex rollovers as well as giving you the code...
http://www.pageresource.com/jscript/jhover1.htm


(i suggest you learn the basics first if you want to understand it)
Learn Basics Here (http://www.pageresource.com/jscript/index.html)