Top.Mail.Ru
? ?
Javascript's Journal
 
[Most Recent Entries] [Calendar View] [Friends View]

Thursday, June 24th, 2004

Time Event
6:12a
rollover images in a menu
allright, I was wondering if there was anyway to use rollover images inside a loop. I have a simple javascript (below) that I am using to display a menu. It contains a for loop that writes out the menu for me so that the code is simpler and easier to change. I was wondering if there was anyway I could add mouse over commands to this script, or somehow include them in a loop system so that I don't have as much code to go throught and change if I add pages in the future. Currently everytime I try to add the mouse over command to the document.writeln it just stops everything from working. Is there anyway I can accomplish what I want, or am I just going to have to write out each individual anchor and image tag?

my scriptCollapse )
6:30p
I'm trying to use a script that disables all clicks. Here it is:

<script language="javascript">

function click() {

if (event.button==1 || event.button==2) {

alert("ALERT TEXT")

}

}

document.onmousedown=click

</script>

The only problem is that I don't want there to be an alert when the mouse is clicked. When taking out "ALERT TEXT" there is just an alert with no message, when I take the whole thing out, nothing works.

Anyone know of a way to accomplish this?

<< Previous Day 2004/06/24
[Calendar]
Next Day >>
About LiveJournal.com
Image