add:   var oType = oIEC[0].value;   if( oType == 'hidden' ) { var temp = oIEC[1]; this.__parameter[k].name = temp.name; this.__parameter[k].value = temp.value; k++; continue; }   if( oType == 'checkbox' ) { var temp = oIEC[2]; this.__parameter[k].name = temp.value; temp.checked?this.__parameter[k].value = 'true':this.__parameter[k].value = 'false'; k++; continue; }   if( oType == 'text' ) {  if( oIEC[1] && oIEC[1].type == 'radio' ) { if( oIEC[1].checked ) {  if( oIEC[4] && oIEC[4].id == 'isNotBlank' ) {  if( birtUtility.trim( oIEC[3].value ) == '' ) { oIEC[2].focus( ); alert( oIEC[3].name + ' cannot be blank' ); return false; } }   this.__parameter[k].name = oIEC[3].name; this.__parameter[k].value = oIEC[3].value; k++;   if( !this.__parameter[k] ) { this.__parameter[k] = { }; } this.__parameter[k].name = this.__isdisplay + this.__parameter[k-1].name; this.__parameter[k].value = oIEC[2].value; k++;    if( oIEC[3].value == oIEC[2].value ) { if( !this.__parameter[k] ) { this.__parameter[k] = { }; } this.__parameter[k].name = this.__islocale; this.__parameter[k].value = oIEC[3].name; k++; } } else {  this.__parameter[k].name = this.__isnull; this.__parameter[k].value = oIEC[1].value; k++; } }  else {  if( oIEC[3] && oIEC[3].id == 'isNotBlank' ) {  if( birtUtility.trim( oIEC[2].value ) == '' ) { oIEC[1].focus( ); alert( oIEC[2].name + ' cannot be blank' ); return false; } }   this.__parameter[k].name = oIEC[2].name; this.__parameter[k].value = oIEC[2].value; k++;   if( !this.__parameter[k] ) { this.__parameter[k] = { }; } this.__parameter[k].name = this.__isdisplay + this.__parameter[k-1].name; this.__parameter[k].value = oIEC[1].value; k++;    if( oIEC[2].value == oIEC[1].value ) { if( !this.__parameter[k] ) { this.__parameter[k] = { }; } this.__parameter[k].name = this.__islocale; this.__parameter[k].value = oIEC[2].name; k++; } }  continue; }   if( oType == 'radio' ) { if( oIEC.length > 1 ) { for( var j = 1; j < oIEC.length; j++ ) {  if( oIEC[j].type == 'radio' && oIEC[j].checked ) {  if( oIEC[j].id == oIEC[j].name + "_null" ) { this.__parameter[k].name = this.__isnull; this.__parameter[k].value = oIEC[j].name; k++; } else {  this.__parameter[k].name = oIEC[j].name; this.__parameter[k].value = oIEC[j].value; k++;   var displayLabel = document.getElementById( oIEC[j].id + "_label" ); if( displayLabel ) { if( !this.__parameter[k] ) { this.__parameter[k] = { }; } this.__parameter[k].name = this.__isdisplay + this.__parameter[k-1].name; this.__parameter[k].value = displayLabel.title; k++; } }  break; } } }  continue; }   if( oType == 'select' && oSEC.length == 1 ) { var flag = true; if( oIEC[2] && oIEC[2].type == 'radio' && !oIEC[2].checked ) { flag = false; }   if( flag ) { if ( oSEC[0].selectedIndex < 0 ) { oSEC[0].focus( ); alert( oIEC[1].name + " should have a value" ); return false; }  var tempText = oSEC[0].options[oSEC[0].selectedIndex].text; var tempValue = oSEC[0].options[oSEC[0].selectedIndex].value;   if( tempText == this.__display_null ) { this.__parameter[k].name = this.__isnull; this.__parameter[k].value = oIEC[1].name; k++; continue; }  if ( this.__is_parameter_not_allowblank( oIEC ) && birtUtility.trim( tempValue ) == '' ) { oSEC[0].focus( ); alert( oIEC[1].name + " cannot be blank" ); return false; }  }   if( oIEC[2] && oIEC[2].type == 'radio' ) { if( oIEC[2].checked ) {  var tempText = oSEC[0].options[oSEC[0].selectedIndex].text; var tempValue = oSEC[0].options[oSEC[0].selectedIndex].value;   this.__parameter[k].name = oIEC[1].name; this.__parameter[k].value = tempValue; k++;   if( !this.__parameter[k] ) { this.__parameter[k] = { }; } this.__parameter[k].name = this.__isdisplay + this.__parameter[k-1].name; this.__parameter[k].value = tempText; k++; } else {  if ( this.__is_parameter_not_allowblank( oIEC ) && birtUtility.trim( oIEC[4].value ) == '' ) { oIEC[4].focus( ); alert( oIEC[1].name + " cannot be blank" ); return false; }   this.__parameter[k].name = oIEC[1].name; this.__parameter[k].value = oIEC[1].value; k++;   if( !this.__parameter[k] ) { this.__parameter[k] = { }; } this.__parameter[k].name = this.__isdisplay + this.__parameter[k-1].name; this.__parameter[k].value = oIEC[4].value; k++;    if( oIEC[4].value == oIEC[1].value ) { if( !this.__parameter[k] ) { this.__parameter[k] = { }; } this.__parameter[k].name = this.__islocale; this.__parameter[k].value = oIEC[1].name; k++; } } } else {  var tempText = oSEC[0].options[oSEC[0].selectedIndex].text; var tempValue = oSEC[0].options[oSEC[0].selectedIndex].value;   this.__parameter[k].name = oIEC[1].name; this.__parameter[k].value = tempValue; k++;   if( !this.__parameter[k] ) { this.__parameter[k] = { }; } this.__parameter[k].name = this.__isdisplay + this.__parameter[k-1].name; this.__parameter[k].value = tempText; k++; }  continue; }  /* 
context: 	collect_parameter : function( )	{		// Clear parameter array		this.__parameter = new Array( );								var k = 0;		//oTRC[i] is <tr></tr> section		var oTRC = document.getElementById( "parameter_table" ).getElementsByTagName( "TR" );		for( var i = 0; i < oTRC.length; i++ )		{			if( !this.__parameter[k] )			{				this.__parameter[k] = { };			}						//input element collection			var oIEC = oTRC[i].getElementsByTagName( "input" );			//select element collection			var oSEC = oTRC[i].getElementsByTagName( "select" );			//avoid group parameter			var oTable = oTRC[i].getElementsByTagName( "table" );			if( oTable.length > 0 || ( oSEC.length == 0 && oIEC.length == 0 ) || ( oIEC.length == 1 && oIEC[0].type == 'submit' ) )			{				continue;			}									if( oSEC.length == 1 && oIEC.length <= 3 )			{				// deal with "select" parameter						if( oIEC.length > 0 )				{					this.__parameter[k].name = oIEC[0].name;				}				else				{					this.__parameter[k].name = oSEC[0].name;				}														if ( oSEC[0].selectedIndex < 0 )				{					oSEC[0].focus( );					alert( this.__parameter[k].name + " should have a value" );					return false;				}								// Check if select 'Null Value' option				var tempText = oSEC[0].options[oSEC[0].selectedIndex].text;										if( tempText && tempText == this.__display_null )				{						this.__parameter[k].name = this.__isnull;					if ( oIEC.length > 0 )						this.__parameter[k].value = oIEC[0].name;					else						this.__parameter[k].value = oSEC[0].name;					k++;					continue;				}																						// check if value is blank, don't allow new value				var tempValue = oSEC[0].options[oSEC[0].selectedIndex].value;				if ( birtUtility.trim( tempValue ) == '' )				{					oSEC[0].focus( );					alert( this.__parameter[k].name + " cannot be blank" );					return false;				}											this.__parameter[k].value = tempValue;								k++;								// set display text for the "select" parameter				if( !this.__parameter[k] )				{					this.__parameter[k] = { };				}				this.__parameter[k].name = this.__isdisplay + this.__parameter[k-1].name;				this.__parameter[k].value = tempText;				k++;								continue;			}						if( oSEC.length == 0 && ( oIEC.length == 1 || oIEC.length == 2 ) )			{				var temp = {};				var tempDef = null;				if( oIEC.length == 1 )				{					temp = oIEC[0]				}				else if( oIEC[0].type == 'hidden' )				{					tempDef = oIEC[0]					temp = oIEC[1];				}				else				{					continue;				}								if( temp.type == 'text' || temp.type == 'password' )				{					// deal with "text" parameter					this.__parameter[k].name = temp.name;					// if the parameter neither has a value nor a default value, error					if( birtUtility.trim( temp.value ) == '' )					{						if( tempDef )						{							temp.focus( );							alert( temp.name + ' cannot be blank' );							return false;						}						else						{							this.__parameter[k].value = temp.value;						}					}					else					{						this.__parameter[k].value = temp.value;					}					k++;				}				else if( temp.type == 'checkbox' )				{					// deal with checkbox					this.__parameter[k].name = temp.value;					temp.checked?this.__parameter[k].value = 'true':this.__parameter[k].value = 'false';  					k++;				}				else if( temp.type == 'radio' )				{					// deal with radio					this.__parameter[k].name = temp.name;					this.__parameter[k].value = temp.value;					k++;												// set display text for the "radio" parameter					var displayLabel = document.getElementById( temp.id + "_label" );					if( !displayLabel )						continue;											if( !this.__parameter[k] )					{						this.__parameter[k] = { };					}					this.__parameter[k].name = this.__isdisplay + this.__parameter[k-1].name;					this.__parameter[k].value = displayLabel.title;					k++;							}				else if( temp.type == 'hidden' )				{					// deal with hidden parameter					this.__parameter[k].name = temp.name;					this.__parameter[k].value = temp.value;					k++;					}			}			else if( oSEC.length <= 1 && oIEC.length >= 3 )			{				for( var j = 0; j < oIEC.length; j++ )				{					// deal with radio					if( oIEC[j].type == 'radio' && oIEC[j].checked )					{						if( oIEC[j+1] && ( oIEC[j+1].type == 'text' || oIEC[j+1].type == 'password' ) )						{							//Check if allow blank							var temp = oIEC[j+2];							if ( temp && temp.id == 'isNotBlank' && temp.value == 'true' )							{								if ( birtUtility.trim( oIEC[j+1].value ) == '' )								{									oIEC[j+1].focus( );									alert( temp.name + ' cannot be blank' );									return false;								}							}														// deal with radio box with textarea or password area							if( oIEC[j+1].name && oIEC[j+1].value )							{								this.__parameter[k].name = oIEC[j+1].name								this.__parameter[k].value = oIEC[j+1].value;								k++;							}							else							{								this.__parameter[k].name = oIEC[j].value								this.__parameter[k].value = oIEC[j+1].value;								//oIEC[j+1].value = "";								k++;	            							}														// set display text for the List type parameter with entered value							if( !this.__parameter[k] )							{								this.__parameter[k] = { };							}							this.__parameter[k].name = this.__isdisplay + this.__parameter[k-1].name;							this.__parameter[k].value = oIEC[j+1].value;							k++;						}						else if( oSEC[0] )						{							// deal with "select" parameter														if ( oSEC[0].selectedIndex < 0 )							{								oSEC[0].focus( );								alert( oIEC[j].value + " should have a value" );								return false;							}																												var tempText = oSEC[0].options[oSEC[0].selectedIndex].text;							var tempValue = oSEC[0].options[oSEC[0].selectedIndex].value;														// Check if select 'Null Value' option							if( tempText == this.__display_null )							{								this.__parameter[k].name = this.__isnull;								this.__parameter[k].value = oIEC[j].value;								k++;									continue;							}							if ( this.__is_parameter_not_allowblank( oIEC ) && birtUtility.trim( tempValue ) == '' )							{								oSEC[0].focus( );								alert( oIEC[j].value + " cannot be blank" );								return false;							}																					this.__parameter[k].name = oIEC[j].value;														this.__parameter[k].value = tempValue;							k++;														// set display text for the "select" parameter							if( !this.__parameter[k] )							{								this.__parameter[k] = { };							}							this.__parameter[k].name = this.__isdisplay + this.__parameter[k-1].name;							this.__parameter[k].value = tempText;							k++;						}						else if( !oIEC[j+1] && !oIEC[j].name )						{							//deal with common radio with null value							this.__parameter[k].name = this.__isnull;							this.__parameter[k].value = oIEC[j-1].name;							k++;						}						else						{							//deal with common radio							this.__parameter[k].name = oIEC[j].name;							this.__parameter[k].value = oIEC[j].value;							k++;													// set display text for the "radio" parameter							var displayLabel = document.getElementById( oIEC[j].id + "_label" );							if( !displayLabel )								continue;															if( !this.__parameter[k] )							{								this.__parameter[k] = { };							}							this.__parameter[k].name = this.__isdisplay + this.__parameter[k-1].name;							this.__parameter[k].value = displayLabel.title;							k++;						}					}				}			}		}		return true;	},
meta: 855	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/855/e67b6a4506a01d4fbb741a982d76ef6cb9dba851/BirtParameterDialog.js/buggy/viewer/org.eclipse.birt.report.viewer/birt/webcontent/birt/ajax/ui/dialog/BirtParameterDialog.js