It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Board index Programming JavaScript Forum

help!

help!

Postby killthelights on Sat Jul 18, 2009 6:15 am

So I'm trying to make a calander, and when you hover over a certain date it will show whats going on that day. EG. Birthdays.

http://acc.tempting-illusions.org/calender/index.php

I used this code

Code: Select all
script type="text/javascript">
function changeover() {
   document.getElementById('link1').style.color = "pink";
   document.getElementById('image1').style.display = "block";
}
function changeout() {
   document.getElementById('link1').style.color = "orange";
   document.getElementById('image1').style.display = "none";
}
</script>

<a href="#" onClick="javascript:changeover();" onMouseOut="javascript:changeout();"  id="link1">1</a>
<img src="/calender/images/august/bdays/1.png" id="image1" style="display: none; position: absolute;">



It worked and all, and then i added a second one and it stopped working on on the first one; showing the second one again when I clicked "1" >:(

The second code was this

Code: Select all
<script type="text/javascript">
function changeover() {
   document.getElementById('link2').style.color = "pink";
   document.getElementById('image2').style.display = "block";
}
function changeout() {
   document.getElementById('link2').style.color = "orange";
   document.getElementById('image2').style.display = "none";
}
</script>
<a href="#" onClick="javascript:changeover();" onMouseOut="javascript:changeout();"  id="link2">2</a>
<img src="/calender/images/august/bdays/2.png" id="image2" style="display: none; position: absolute;">


What do I do O_O help!
killthelights
 
Posts: 1
Joined: Sat Jul 18, 2009 6:02 am

Who is online

Users browsing this forum: No registered users and 5 guests