rem: var msg = param.GetString( 0 ); dump("message: "+ msg +"\n"); SetElementText("info.txt", msg ); 
add: var messageText = param.GetString( 0 ); dump("message: "+ messageText +"\n"); { var messageFragment;    var messageParent = (document.getElementById("info.txt")); done = false; while (!done) { breakIndex =   messageText.indexOf('\n'); if (breakIndex == 0) {  messageText = messageText.slice(1); dump("Found break at begining\n"); messageFragment = ""; } else if (breakIndex > 0) {  messageFragment = messageText.slice(0, breakIndex);   messageText = messageText.slice(breakIndex+1); } else {  done = true; messageFragment = messageText; } messageNode = document.createTextNode(messageFragment); if (messageNode) messageParent.appendChild(messageNode);   breakNode = document.createElementWithNameSpace("BR", "http: if (breakNode) messageParent.appendChild(breakNode); } }  var windowTitle = param.GetString( 1 ); window.title = windowTitle;  
context: function selectDialogOnLoad(){	dump("selectDialogOnLoad \n");	doSetOKCancel( commonDialogOnOK, commonDialogOnCancel );		param = window.arguments[0].QueryInterface( Components.interfaces.nsIDialogParamBlock  );	if( !param )		dump( " error getting param block interface\n" );		var msg = param.GetString( 0 );	dump("message: "+ msg +"\n");	SetElementText("info.txt", msg ); 	listBox = document.getElementById("list");	var numItems = param.GetInt( 2 )		for ( i = 1; i <= numItems; i++ )	{		var newString = param.GetString( i );		dump("setting string "+newString+"\n");		var newOption = new Option( newString );		listBox.options[listBox.options.length] = newOption;		}	dump("number of items "+ listBox.options.length +" "+listBox.length+"\n");	listBox.selectedIndex = 0;	// Move to the right location	moveToAlertPosition();}
meta: 10234	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10234/a532bc65a5ba754da965754322fb5e12cdf031cc/selectDialog.js/buggy/xpfe/global/resources/content/selectDialog.js