CSS unter Netscape 6.x
lorenlai
- css
Hallo,
kann jemand mir helfen bitte ?
Ich hab da so einen Script, der mir eine Zeile hinzufügt bzw. entfernt. Läuft auch bestens :=) unter Netscape 6.x und IE 6.0 !
Aber wenn ich ein CSS Befehl mit einbaue (overflow:auto)
#outline2 {
Background-Color: #ffffff;
Width: 750px;
Height: 104px;
Border: 2px solid #6666CC;
overflow: auto;
}
Dann funktioniert das Hinzufügen bzw. Entfernen einer Zeile nicht mehr. Es erscheint nicht mehr im DIV-EBENE.
Woran kann das liegen ?
Komischerweise funktioniert es unter IE 6.0 , aber nicht unter Netscape 6.x . Ich brauche es aber für Netscape 6.x !
Kann jemand mir helfen bitte ?
Danke im voraus !
Loren
Un do sieht mein CODE aus:
<html>
<head>
<style type="text/css">
#outline2 {
Background-Color: #ffffff;
Width: 750px;
Height: 104px;
Border: 2px solid #6666CC;
overflow: auto;
}
.selectBox {
Color: #0000ff;
Background-Color: #FFFFFF;
Border: 1px solid #6666CC;
Width: 300px;
}
.editCellTitle1 {
Color: #000000;
Background-Color: #FEFFF1;
Border: 1px solid #6666CC;
Width: 300px;
Font-Size: 12px;
Font-Weight: bold;
}
.editCellTitle2 {
Color: #000000;
Background-Color: #FEFFF1;
Border: 1px solid #6666CC;
Width: 450px;
Font-Size: 12px;
Font-Weight: bold;
}
.editButton {
Color: #ffffff;
Background-Color: #6666CC;
}
</style>
</head>
<body>
<script>
counts = new Array();
counts[0] = new Array("A", "test1");
counts[1] = new Array("B", "");
counts[2] = new Array("C", "Test3");
counts[3] = new Array("D", "Test4");
marker=-1
function schreiben() {
txt='<form name="myForm2" action="http://localhost/cgi-bin/test.pl">'
txt+='<table width="750" cellspacing="0" cellpadding="0" border="0">'
for(i=0;i<counts.length;i++) {
txt+='<tr>'
txt+='<td onclick="marken('+i+')">'
txt+='<select class="selectBox" id="t1_'+i+'" name="t1_'+i+'" onfocus="farbwechsel('+i+',1);marken('+i+')" onblur="speichern('+i+',0,this.options[this.selectedIndex].value);farbwechsel('+i+',0)" style="background-color:#FFFFFF">';
txt+='<option value="A"'; if (counts[i][0] == "A") txt+=' selected="true"'; txt+='>AAA</opton>';
txt+='<option value="B"'; if (counts[i][0] == "B") txt+=' selected="true"'; txt+='>BBB</opton>';
txt+='<option value="C"'; if (counts[i][0] == "C") txt+=' selected="true"'; txt+='>CCC</opton>';
txt+='<option value="D"'; if (counts[i][0] == "D") txt+=' selected="true"'; txt+='>DDD</opton>';
txt+='</select>'
txt+='</td><td onclick="marken('+i+')">'
txt+='<input type="text" id="t2_'+i+'" name="t2_'+i+'" class="editCellTitle2" value=" '+counts[i][1]+'" onchange="speichern('+i+',1,this.value)" onfocus="farbwechsel('+i+',1);marken('+i+')" onblur="farbwechsel('+i+',0)" style="background-color:#FFFFFF">'
txt+='</td><td onclick="marken('+i+')">'
txt+='</td>'
txt+='</tr>'
}
txt+='</table>'
txt+='<input type="submit" value="speichern">'
txt+='</form>'
document.getElementById('outline2').innerHTML=txt
}
function dazu() {
if (counts.length<5){
counts[counts.length]=new Array("","");
schreiben();
}
else {alert("zuViel")}
}
function speichern( nr, feld, wert ) {
counts[ nr ][ feld ] = wert;
marker = -1;
}
function farbwechsel(nr,zustand) {
if(zustand==1) {
document.getElementById('t1_'+nr).style.backgroundColor="#FDFFEA"
document.getElementById('t2_'+nr).style.backgroundColor="#FDFFEA"
}
else {
document.getElementById('t1_'+nr).style.backgroundColor="#FFFFFF"
document.getElementById('t2_'+nr).style.backgroundColor="#FFFFFF"
}
}
function marken(nr) {
marker=nr
}
function einsweg() {
counts[marker][0]=null
counts[marker][1]=null
temparray=counts
counts=new Array()
for(i=0;i<temparray.length;i++) {
if(temparray[i][0]!=null)
counts[counts.length]=new
Array(temparray[i][0],temparray[i][1])
}
schreiben()
}
</script>
<table width="750">
<tr>
<td class="editButton" colspan="2"><a href="javascript:dazu()">insert row</a> <a href="javascript:einsweg()">delete row</a></td><td><a href="javascript:document.myForm2.submit()">sss</a></td>
</tr>
</table>
<div id="outline2">
<script>
schreiben()
</script>
</div>
</body>
</html>