Wow Web Designs Forums Home

Search
   
Members

Calendar

Help

Home
Search by username
Not logged in - Login | Register 
Wow Web Designs Forums > Scripting > JavaScript & DHTML > Java Menu with dynamically altinating pictures?


Java Menu with dynamically altinating pictures?
 Moderated by: Aycan  

New Topic

Reply

Print
AuthorPost
Merlyn
Member
 

Joined: Thu Jan 1st, 2004
Location: Adelaide, Australia
Posts: 14
Status:  Offline
Mana: 
 Posted: Sat Jun 18th, 2005 03:26 am

Quote

Reply
Hi All

Could some one point me in the direction of some example/sample code that will allow a central picture to change when you mouse over the various menu items. It would be good also if when the picture changes there is the ability to add a or different transitions as well. Maybe even some websites that specialise in this, I have a few but any other good ones would be much appreciated.

I am new to Java and am not looking to steal code, I just want to see how it works. Don't get me wrong, I will probably use the code to some extent (only if that's OK) and modify it to my requirements. I have a non commercial/non profit site.

Thanks

Merlyn

geek4ever
Member
 

Joined: Thu Jun 30th, 2005
Location:  
Posts: 1
Status:  Offline
Mana: 
 Posted: Fri Jul 1st, 2005 02:27 am

Quote

Reply
I'm not certain which type your looking for. Try these

 

<CENTER>
<A HREF="http://.com"
onmouseover="movepic('button','pic-off.gif')"
onmouseout="movepic('button','pic-on.gif')">
<IMG NAME="button" SRC="pic-off.gif" ALT="Image"></A>
</CENTER>

<!-- Script Size:  1.17 KB  -->

 

This is another option

SCRIPT LANGUAGE="JavaScript">


var dtext = new Image();
var dlarge = new Image();
var stext = new Image();
var slarge = new Image();
var ttext = new Image();
var tlarge = new Image();

dtext.src = "dallas-text.jpg";
dlarge.src = "dallas-large.jpg";
stext.src = "sandiego-text.jpg";
slarge.src = "sandiego-large.jpg";
ttext.src = "tokyo-text.jpg";
tlarge.src = "tokyo-large.jpg";

function doButtons(textimage, picimage) {
document['text'].src=textimage;
document['picture'].src=picimage;
}
//  End -->
</script>
</HEAD>

<BODY>

<center>
<table border=1>
<tr><td>
<center><h2>Places I've been:</h2></center>
<p>
<li><a href = "http://www.dlas.com" onmouseover = "doButtons('dallas-text.jpg', 'dallas-large.jpg')" onmouseout = "doButtons('blank.gif', 'blank.gif')">Dallas<p>

<li><a href = "http://www.snet.gov" onmouseover = "doButtons('sandiego-text.jpg', 'sandiego-large.jpg')" onmouseout = "doButtons('blank.gif', 'blank.gif')">San Diego<p>

<li><a href = "http://www.japde.com/e/e2164.html" onmouseover = "doButtons('tokyo-text.jpg', 'tokyo-large.jpg')" onmouseout = "doButtons('blank.gif', 'blank.gif')">Tokyo<p>

<img name=text src="blank.gif" width=240 height=20 border=0></td>

<td>
<img name=picture src="blank.gif" width=440 height=300 border=0></td>
</tr>
</table>
</center>


<!-- Script Size:  1.80 KB -->

Last edited on Tue Jul 5th, 2005 01:58 am by


 Current time is 03:25 am




Powered by WowBB 1.7 - Copyright © 2003-2006 Aycan Gulez
Page processed in 0.1757 seconds (15% database + 85% PHP). 16 queries executed.