Posted by crion on 21:43:00 03-26-2002
i need some help with a javascript...
...
I want to change the visibility for both "bild1" and "bild2" when u click on "link1.gif"
[ This Message was edited by: crion on 2002-03-26 21:43 ]
Posted by Henning on 19:10:00 04-13-2002
Make it so
<img name="image" src="symbol1.gif" onclick="image.src='symbol1c.gif';">
Henning
[addsig]
Posted by sacah on 19:26:00 04-13-2002
ok, I think you would be better makin a blank image, and just swapping the images around on mouse over, due to styles not being cross browser compatible.
Posted by crion on 00:46:00 04-14-2002
can u show me?
Posted by KaGez on 11:27:00 04-14-2002
@ informit.com they have a few free books about javascript too. maybe a good place to check out
[addsig]
Posted by sacah on 19:30:00 04-18-2002
<!--- This is an Elated PageKit - www.elated.com. All artwork © 1998 Elated.--->
<HTML>
<head>
<title> a.i </title>
<script language="JavaScript">
<!--
browserName=navigator.appName;
browserVer=parseInt (navigator.appVersion);
version="n2";
if (browserName == "Netscape" && browserVer >= 3) version = "n3";
if (browserName == "Microsoft Internet Explorer" && browserVer >=4)
version = "e4";
if (version == "n3" || version == "e4")
{
blank2 = new Image(106, 68);
blank2.src = "images/blank.gif";
one = new Image(106, 68);
one.src = "images/one.gif";
two = new Image(106, 68);
two.src = "images/two.gif";
three = new Image(106, 68);
three.src = "images/three.gif";
four = new Image(106, 68);
four.src = "images/four.gif";
five = new Image(106, 68);
five.src = "images/five.gif";
six = new Image(106, 68);
six.src = "images/six.gif";
}
function button_on (imgName)
{
if (version == "n3" || version == "e4")
{
butOn = eval (imgName + "_on.src");
document [imgName].src = butOn;
}
}
function button_off (imgName)
{
if (version == "n3" || version == "e4")
{
butOff = eval (imgName + "_off.src");
document [imgName].src = butOff;
}
}
// -->
</script>
</head>
<BODY BGCOLOR="black" link="3df7ff" vlink="3df7ff" alink="999999">
<TABLE BORDER=0 cellpadding=0 cellspacing=0 width=98% height=98%>
<tr>
<td valign=middle align=center>
<TABLE BORDER=0 cellpadding=0 cellspacing=0>
<tr>
<td><img src="images/left.gif" border=0></td>
<td>
<TABLE BORDER=0 cellpadding=0 cellspacing=0>
<tr><td><img src="images/top.gif" border=0></td></tr>
<tr><td><img src="images/blank.gif" border=0 name="blank"></td></tr>
<tr><td><A HREF="about.html" onMouseOver="blank.src=one.src; window.status='about'; return true" onMouseOut="blank.src=blank2.src; window.status=' '; return true"><img src="images/about.gif" border=0></td></tr>
<tr><td><A HREF="news.html" onMouseOver="blank.src=two.src; window.status='news'; return true" onMouseOut=" blank.src=blank2.src; window.status=' '; return true"><img src="images/news.gif" border=0></td></tr>
<tr><td><A HREF="gallery.html" onMouseOver="blank.src=three.src; window.status='gallery'; return true" onMouseOut="blank.src=blank2.src; window.status=' '; return true"><img src="images/gallery.gif" border=0></td></tr>
<tr><td><A HREF="tests.html" onMouseOver="blank.src=four.src; window.status='test'; return true" onMouseOut="blank.src=blank2.src; window.status=' '; return true"><img src="images/tests.gif" border=0></td></tr>
<tr><td><A HREF="coms.html" onMouseOver="blank.src=five.src; window.status='coms'; return true" onMouseOut="blank.src=blank2.src; window.status=' '; return true"><img src="images/coms.gif" border=0></td></tr>
<tr><td><A HREF="mailto:you@wherever.whatever?subject=my site" onMouseOver="blank.src=six.src; window.status='email'; return true" onMouseOut="blank.src=blank2.src; window.status=' '; return true"><img src="images/email.gif" border=0></td></tr>
<tr><td><img src="images/bottom.gif" border=0></td></tr></table></td>
<td><img src="images/right.gif" border=0></td></tr></table></td></tr>
<tr><td align=center><a href="http://www.elated.com/" target="_top"><font face="arial, helvetica" color="999999"><small>ELATED PageKits</small></font></a>
</td></tr></table></center>
</body></html>
Posted by nelson8801 on 23:41:00 09-29-2003
I don't know if you wanted to change the visibility to visible or hidden, or change to visible if hidden, etc.
The following is the former,
<html>
<head>
<style>
.visible {visibility: visible}
.hide {visibility: hidden}
</style>
<script>
function chgV(clsN){
bild1.className=clsN;
bild2.className=clsN;
}
</script>
</head>
<body>
....
<img src="link1.gif" onClick="chgV('visible')">
/*
change the argument to 'hide' if you want to hide them.
*/
...
</body>
</html>
[ This Message was edited by: nelson8801 on 2003-09-29 23:43 ]
Posted by Neu[Mann] on 00:31:00 09-30-2003
Please. Check the date of the message you replied too. It was written more than 1 year ago. Thank you.
Posted by cowsarenotevil on 02:39:00 09-30-2003
This thread if the original poster is actually still looking for replies, please e-mail me. I'll happily reopen this. Otherwise, good bye.