WP: WH-MDC05J3E5,WH-MDC07J3E5, WPB: Atlantic Explore v4, PV: Solaredge (6,8kW) en SMA (4,3kW), 2 x Heishamon OT v3.1, Rpi v5, Rpi v4, 2 x Rpi v3, ESP32, Domoticz, EV: Nissan Leaf,BYD Seal AWD, ESS: Deye 6K-SG03LP1, 2xLuyuan, 32kWh
Misschien een beetje aan de late kant, maar, hier is een oplossing voor je probleem. 
Ik denk dat dit best wel duidelijk is.
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
| var aPulldownBoxes = new Array('Team', 'Category', 'DocTemplate');
aCategory[0] = new Array(105, 'Project', 'A');
aCategory[1] = new Array(106, 'Tools & Templates', 'A');
aCategory[2] = new Array(105, 'Project', 'AA');
aCategory[3] = new Array(107, 'Supporting material', 'AA');
aCategory[4] = new Array(106, 'Tools & Templates', 'AA');
aCategory[5] = new Array(107, 'Supporting material', 'ABA');
aDocTemplate[0] = new Array(16, 'Emeritor contract', 105)
aDocTemplate[1] = new Array(18, 'Emeritor blue print', 106)
function changeBoxes(fromBox)
{
var i = 1;
var sBox = aPulldownBoxes[0];
while(fromBox != sBox && i < 10)
{
sBox = aPulldownBoxes[i];
i = i + 1;
}
for(i; i < aPulldownBoxes.length; i++)
{
optionsChange(aPulldownBoxes[i - 1], PulldownBoxes[i]);
}
}
function optionsChange(boxFrom, boxTo)
{
var iIndex;
var sPropertyType, sProperty;
sPropertyType = eval("document.all." + boxFrom);
sProperty = eval("document.all." + boxTo);
while (sProperty.length > 0)
{
sProperty.options[0]=null;
}
var iFromId = sPropertyType.options[sPropertyType.selectedIndex].value;
var iAddedIndex = 0;
for (iIndex = 0; iIndex < eval('a' + boxTo + '.length'); iIndex++)
{
if (eval("a" + boxTo + "[iIndex] [2] == iFromId"))
{
sProperty.options[iAddedIndex] = new Option(eval("a" + boxTo + "[iIndex] [1]"), eval("a" + boxTo + "[iIndex] [0]"));
if (eval("a" + boxTo + "[iIndex] [0] == iFromId"))
{
sProperty.selectedIndex = iAddedIndex;
}
iAddedIndex++;
}
}
} |
Ik denk dat dit best wel duidelijk is.
| Life is a game (and games are fun) | homepage |
javascript hoort niet in P&W
+ dit is een heel oud topic
+ dit is een heel oud topic
Dit topic is gesloten.
![]()