CSS bei Netscape 6.x => autoflow:auto;
lorenlai
- css
Hallo,
kann jemand mir helfen bitte ?
Ich hab hier so ein JS-Script, welcher mir eine Zeile hinzufügt bzw. eine Zeile des Tabellens entfernt.
Ich verwende dabei einen
<DIV id="outline2">
<script>
schreiben() //meine Tabele
</script>
</DIV>
Ich brauche hier einen DIV, damit ich mit CSS-Befehl overflow:auto;
die Tabelle darin "scrollen" kann.
Aber sobald ich diesen Befehl autoflow:auto; einsetze, dann wird meine Tabelle beim Hinzufügen bzw. Enfernen einer Zeile "ausgeblendet" (es ist zwar noch da, aber nur ausgeblendet).
Würde ich overflow:auto weglassen, dann funktioniert das, aber ich kann leider nicht scrollen :(
Bemerkung: Unternet IE 6 funktioniert komischerweise mit autoflow:auto;
ABER unter NETSCAPE 6.x leider nicht :((( Ich brauche es aber für NETSCAPE 6.x
Kann jemand mir helfen bitte ? Was mache ich denn falsch ?
Hier ist der Script:
<html>
<head>
<style type="text/css">
.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;
}
</style>
</head>
<body>
<script type="text/javascript">
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</option>';
txt+='<option value="B"'; if (counts[i][0] == "B") txt+=' selected="true"'; txt+='>BBB</option>';
txt+='<option value="C"'; if (counts[i][0] == "C") txt+=' selected="true"'; txt+='>CCC</option>';
txt+='<option value="D"'; if (counts[i][0] == "D") txt+=' selected="true"'; txt+='>DDD</option>';
txt+='</select>'
txt+='</td>'
txt+='<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>'
txt+='</tr>'
}
txt+='</table>'
txt+='</form>'
document.getElementById('outline2').innerHTML=txt
}
function dazu() {
if (counts.length<10){
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><a href="javascript:dazu()">insert row</a></td>
<td><a href="javascript:einsweg()">delete row</a></td>
</tr>
</table>
<div id="outline2" STYLE="position:absolute;Width:750px;Height:104px;Border:2px solid #cc6666;overflow:auto;">
<script type="text/javascript">
schreiben()
</script>
</div>
</body>
</html>
Danke im voraus !
Gruss,
Loren
email: lorenlai@yahoo.com
hi
Ich brauche hier einen DIV, damit ich mit CSS-Befehl overflow:auto;
die Tabelle darin "scrollen" kann.
Aber sobald ich diesen Befehl autoflow:auto; einsetze, dann wird meine Tabelle beim Hinzufügen bzw. Enfernen einer Zeile "ausgeblendet" (es ist zwar noch da, aber nur ausgeblendet).
overflow:auto; kenne ich (und geht in Mozilla-Browsern auch), aber was zum teufel ist 'autoflow'? Weder auf w3c.org noch (falls es eine MS-Erweiterung ist) MSDN habe ich da irgendwas gefunden...
Grüße aus Bleckede
Kai