romero: farbiger String in einer Tabelle klappt nicht.

Beitrag lesen

Hi,

wenn ich aber nun das mit der farbe hinzufüge dann bringt er statt des farbigen teils folgende ausgabe in der tabelle:

<font color="red">Text der sonst auch zu sehen ist</font>

aber da ist nix farbig.was mache ich da falsch?

Auch in diesem Fall zeigst du uns schon wieder nicht, *was* du gemacht hast.

Könntest du vielleicht langsam mal anfangen, halbwegs intelligente Problembeschreibungen zu liefern?

MfG ChrisB

dachte ich hätte es.nunja dann versuch ich es erneut.

				for( var i = 0; i < e_Gesamt.length; i++ )  
				{  
					for( var j = 0; j < f_Füllstoff.length; j++ )  
					{  
						if( e_Gesamt[i].substr( 0, 11 ) == f_Füllstoff[j].substr( 0, 11 ) && e_Gesamt[i].substr( 11, 3 ) != f_Füllstoff[j].substr( 11, 3 ) )  
						{  
							if( e_Gesamt[i] != f_Füllstoff[j] )  
							{  
								unterschiede_Gesamt.push( e_Gesamt[i] + "/" + f_Füllstoff[j] + "/andere Variante vorhanden!" );  
								e_Gesamt.splice( i, 1, "" );  
								f_Füllstoff.splice( j, 1, "" );  
								a_Gesamt.splice( i, 1, "" );  
								b_Gesamt.splice( j, 1, "" );  
  
								ZählerUngleicherMatten++;  
							};

das war die ausgangssituation:

nun will ich es wie folgt haben:

				for( var i = 0; i < e_Gesamt.length; i++ )  
				{  
					for( var j = 0; j < f_Füllstoff.length; j++ )  
					{  
						if( e_Gesamt[i].substr( 0, 11 ) == f_Füllstoff[j].substr( 0, 11 ) && e_Gesamt[i].substr( 11, 3 ) != f_Füllstoff[j].substr( 11, 3 ) )  
						{  
							if( e_Gesamt[i] != f_Füllstoff[j] )  
  
//--> hier die änderung die ich vornehmen will  
							{  
							unterschiede_Gesamt.push( e_Gesamt[i].substr( 0, 11 ) + "<font color='darkred'>" + e_Gesamt[i].substr( 11, 3 ) + "</font>" + e_Gesamt[i].substr( 14, e_Gesamt[i].length ) + "/" + f_Füllstoff[j].substr( 0, 11 ) + "<font color='darkred'>" + f_Füllstoff[j].substr( 11, 3 ) + "</font>" + f_Füllstoff[j].substr( 14, f_Füllstoff[j].length ) + "/andere Variante vorhanden!" );  
								e_Gesamt.splice( i, 1, "" );  
								f_Füllstoff.splice( j, 1, "" );  
								a_Gesamt.splice( i, 1, "" );  
								b_Gesamt.splice( j, 1, "" );  
  
								ZählerUngleicherMatten++;  
							};

ausgeben tut er mir als vorschau folgendes:

D258_70100_332N_20b/D258_70100_032N_20b/andere Variante vorhanden! -> wobei die 332 bzw 032 farbig sind.

in der tabelle aber kommt folgendes:

D258_70100_<font color='darkred'>332< - font>N_20b/D258_70100_<font color='darkred'>032</font>N_20b  andere Variante vorhanden!

wo ist da mein problem?