JS in IE
Code (php)
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
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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<script language="JavaScript">
function checkType(x)
{
if(x=="Gallery")
{
document.getElementById("cols").disabled=false
document.getElementById("rows").disabled=false
}else{
document.getElementById("cols").disabled=true
document.getElementById("rows").disabled=true
}
}
</script>
<title>Untitled Document</title>
<link href='css/style.css' rel='stylesheet' title='stylesheet' media='screen' type='text/css'>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<table width="400" cellpadding="1" cellspacing="0">
<form>
<tr>
<th width="38%" align="left" colspan="2">New page</th>
</tr>
<tr>
<td width="38%" align="right">Page:</td>
<td width="62%" align="left"><input type="text" name="page" class="field"></td>
</tr>
<tr>
<td width="38%" align="right">Type:</td>
<td width="62%" align="left">
<select name="type" onChange="checkType(this.form.type.options[this.form.type.selectedIndex].value)" class="field">
<option>Standard</option>
<option>News</option>
<option>Gallery</option>
<option>Guestbook</option>
</select>
</td>
</tr>
<tr>
<td width='38%' align='right'></td>
<td width='62%' align='left'><input type='text' id='cols' name='cols' size='2' class='field' disabled> images per row</td>
</tr>
<tr>
<td width='38%' align='right'></td>
<td width='62%' align='left'><input type='text' id='rows' name='rows' size='2' class='field' disabled> rows per page</td>
</tr>
<tr>
<td width="38%" align="right"></td>
<td width="62%" align="left"><input type="submit" name="submit" value="Create page" class="button_s"></td>
</tr>
<tr>
<th width="38%" align="left" colspan="2"> </th>
</tr>
</form>
</table>
</body>
</html>
<html>
<head>
<script language="JavaScript">
function checkType(x)
{
if(x=="Gallery")
{
document.getElementById("cols").disabled=false
document.getElementById("rows").disabled=false
}else{
document.getElementById("cols").disabled=true
document.getElementById("rows").disabled=true
}
}
</script>
<title>Untitled Document</title>
<link href='css/style.css' rel='stylesheet' title='stylesheet' media='screen' type='text/css'>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<table width="400" cellpadding="1" cellspacing="0">
<form>
<tr>
<th width="38%" align="left" colspan="2">New page</th>
</tr>
<tr>
<td width="38%" align="right">Page:</td>
<td width="62%" align="left"><input type="text" name="page" class="field"></td>
</tr>
<tr>
<td width="38%" align="right">Type:</td>
<td width="62%" align="left">
<select name="type" onChange="checkType(this.form.type.options[this.form.type.selectedIndex].value)" class="field">
<option>Standard</option>
<option>News</option>
<option>Gallery</option>
<option>Guestbook</option>
</select>
</td>
</tr>
<tr>
<td width='38%' align='right'></td>
<td width='62%' align='left'><input type='text' id='cols' name='cols' size='2' class='field' disabled> images per row</td>
</tr>
<tr>
<td width='38%' align='right'></td>
<td width='62%' align='left'><input type='text' id='rows' name='rows' size='2' class='field' disabled> rows per page</td>
</tr>
<tr>
<td width="38%" align="right"></td>
<td width="62%" align="left"><input type="submit" name="submit" value="Create page" class="button_s"></td>
</tr>
<tr>
<th width="38%" align="left" colspan="2"> </th>
</tr>
</form>
</table>
</body>
</html>
www.orange-clan.com/test.html
B.v.d
Code (php)
1
2
3
4
5
6
7
8
9
10
11
12
13
2
3
4
5
6
7
8
9
10
11
12
13
function checkType(x)
{
alert(x);
if(x=="Gallery")
{
document.getElementById("cols").disabled=false;
document.getElementById("rows").disabled=false;
}else{
document.getElementById("cols").disabled=true;
document.getElementById("rows").disabled=true;
}
}
{
alert(x);
if(x=="Gallery")
{
document.getElementById("cols").disabled=false;
document.getElementById("rows").disabled=false;
}else{
document.getElementById("cols").disabled=true;
document.getElementById("rows").disabled=true;
}
}
Ik heb ff voor je lopen prusen, en het blijkt dat je voor IE op persé de value attribuut moet toepassen. dan werkt ie wel..
Code (php)
1
2
3
4
2
3
4
<option value="Standard">Standard</option>
<option value="News">News</option>
<option value="Gallery">Gallery</option>
<option value="Guestbook">Guestbook</option>
<option value="News">News</option>
<option value="Gallery">Gallery</option>
<option value="Guestbook">Guestbook</option>
Werkt uitstekend!
Bedankt!