[JavaScript] Rechsklik Menu

Pagina: 1
Acties:

  • Rickets
  • Registratie: Augustus 2001
  • Niet online

Rickets

Finger and a shift

Topicstarter
Ik heb nu de volgende code om een menuutje te krijgen als er op de rechtermuisknop gedrukt wordt, maar hoe moet ik nu de kleur van de letters veranderen??
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
<style>
<!--
.skin0 {
position:absolute;
text-align:left;
width:200px;
border:2px solid black;
background-color:menu;
font-family:Verdana;
line-height:20px;
cursor:default;
visibility:hidden;
}
.skin1 {
cursor:default;
font:menutext;
position:absolute;
text-align:left;
font-family: Arial, Helvetica, sans-serif;
font-size: 10pt;
width:120px;
background-color:menu;
border:1 solid buttonface;
visibility:hidden;
border:2 outset buttonhighlight;
}
.menuitems {
padding-left:15px;
padding-right:10px;
}
-->
</style>

<SCRIPT LANGUAGE="JavaScript1.2">

<!-- Begin
var menuskin = "skin1"; // skin0, or skin1
var display_url = 0; // Show URLs in status bar?
function showmenuie5() {
var rightedge = document.body.clientWidth-event.clientX;
var bottomedge = document.body.clientHeight-event.clientY;
if (rightedge < ie5menu.offsetWidth)
ie5menu.style.left = document.body.scrollLeft + event.clientX - ie5menu.offsetWidth;
else
ie5menu.style.left = document.body.scrollLeft + event.clientX;
if (bottomedge < ie5menu.offsetHeight)
ie5menu.style.top = document.body.scrollTop + event.clientY - ie5menu.offsetHeight;
else
ie5menu.style.top = document.body.scrollTop + event.clientY;
ie5menu.style.visibility = "visible";
return false;
}
function hidemenuie5() {
ie5menu.style.visibility = "hidden";
}
function highlightie5() {
if (event.srcElement.className == "menuitems") {
event.srcElement.style.backgroundColor = "highlight";
event.srcElement.style.color = "white";
if (display_url)
window.status = event.srcElement.url;
   }
}
function lowlightie5() {
if (event.srcElement.className == "menuitems") {
event.srcElement.style.backgroundColor = "";
event.srcElement.style.color = "black";
window.status = "";
   }
}
function jumptoie5() {
if (event.srcElement.className == "menuitems") {
if (event.srcElement.getAttribute("target") != null)
window.open(event.srcElement.url, event.srcElement.getAttribute("target"));
else
window.location = event.srcElement.url;
   }
}
//  End -->
</script>
</HEAD>

<BODY>
<div id="ie5menu" class="skin0" onMouseover="highlightie5()" onMouseout="lowlightie5()" onClick="jumptoie5();">
<div class="menuitems" url="javascript:history.back();">Go Back</div>
<div class="menuitems" url="http://javascript.internet.com">Go Home</div>
<hr>
<div class="menuitems" url="http://forum.javascriptsource.com">JS Forum</div>
<div class="menuitems" url="http://faq.javascriptsource.com">Site FAQs</div>
<hr>
<div class="menuitems" url="http://javascript.internet.com/link-us.html">Link to Us</div>
<div class="menuitems" url="http://javascript.internet.com/feedback.html">Contact Us</div>
</div>
<script language="JavaScript1.2">
if (document.all && window.print) {
ie5menu.className = menuskin;
document.oncontextmenu = showmenuie5;
document.body.onclick = hidemenuie5;
}
</script>
</BODY>

If some cunt can fuck something up, that cunt will pick the worst possible time to fucking fuck it up, because that cunt’s a cunt.


  • Oefening
  • Registratie: November 2000
  • Niet online
[edit]laat maar, ik moet leren lezen/kijken :)

Verwijderd

Post ff een url, of de totale code.
Dit is te weinig omdat dit alleen niet werkt en ik te lui ben om na te gaan welke div op visible ofzo moet staan.

Maar je kunt binnen je css aangeven welke kleur de letters moeten hebben, of het object gewoon specifiek zelf via .style aan spreken.

  • Rickets
  • Registratie: Augustus 2001
  • Niet online

Rickets

Finger and a shift

Topicstarter
:) Niemand? :)

If some cunt can fuck something up, that cunt will pick the worst possible time to fucking fuck it up, because that cunt’s a cunt.


Verwijderd

de kleur van je letters..
<style>
<!--
.skin0 {
position:absolute;
text-align:left;
width:200px;
border:2px solid black;
background-color:menu;
font-family:Verdana;
font-color:#000000;
etc..
</style>

zoiets?

  • Rickets
  • Registratie: Augustus 2001
  • Niet online

Rickets

Finger and a shift

Topicstarter
Op zondag 25 november 2001 20:11 schreef JayAnzee het volgende:
de kleur van je letters..
<style>
<!--
.skin0 {
position:absolute;
text-align:left;
width:200px;
border:2px solid black;
background-color:menu;
font-family:Verdana;
font-color:#000000;
etc..
</style>

zoiets?
Ik krijg het niet voor mekaar.

If some cunt can fuck something up, that cunt will pick the worst possible time to fucking fuck it up, because that cunt’s a cunt.


  • El Martino
  • Registratie: December 2000
  • Laatst online: 04-08 10:37

El Martino

Zo niet, dan toch.

Gebruik niet

font-color:#000000;

maar

color:#000000;

:)

"To make a bad day worse, spend it wishing for the impossible", Calvin (Calvin & Hobbes)


  • Rickets
  • Registratie: Augustus 2001
  • Niet online

Rickets

Finger and a shift

Topicstarter
Op zondag 25 november 2001 21:33 schreef _Martijn_ het volgende:
Gebruik niet

font-color:#000000;

maar

color:#000000;

:)
Ja hoor, dankjewel!

If some cunt can fuck something up, that cunt will pick the worst possible time to fucking fuck it up, because that cunt’s a cunt.

Pagina: 1