console.debug($(this.worker.asHTMLTable(this.options))); 
Regexpresso.prototype.onSubmit = function(){	console.debug(this,".onSubmit()");	// makes sure the pattern used will be the one in the current tab even if its content has not changed	console.debug("switch(",this.tabs_regex.tabs[this.tabs_regex.now],")");	switch ( this.tabs_regex.now )	{		case 0:			this.onFieldUpdate( this.widget_search[0] );			this.onFieldUpdate( this.widget_search['i'] );			this.onFieldUpdate( this.widget_search['g'] );			this.onFieldUpdate( this.widget_search['m'] );			break;		case 1:			this.onFieldUpdate( this.widget_replace[0] );			this.onFieldUpdate( this.widget_replace[1] );			this.onFieldUpdate( this.widget_replace['i'] );			this.onFieldUpdate( this.widget_replace['g'] );			this.onFieldUpdate( this.widget_replace['m'] );			break;		case 2:			this.onFieldUpdate(this.widget_expert);			break;	}	try	{		// the following operation can take time if the input text is big		this.worker = new RegexWorker( this.dom_subject.value, this.dom_regex.value );		// displays the results depending on the requested operation		switch ( RegExp.explainPerlRegexPattern(this.worker.pattern).action )		{			case 'm':			case '':			{				// first, prints the number of matches				var howmany_text = "no match.";				if ( this.worker.matches.length > 0 )				{					if ( this.worker.matches.length == 1 )						howmany_text = "1 match";					else						howmany_text = this.worker.matches.length + " matches";				}				this.dom_output_count.setText(" (" + howmany_text + ")");				this.dom_output_count.toggleClass("alt");				// then the menus				if ( this.options.showResults && this.worker.matches.length > 0 )				{					// builds the icons menu and displays/hides all of its clones					this.filterMenu(['asText','asTable','showIndexes','showBackrefs','showNonPrintable','copy']);				}				this.duplicateMenu();				// then outputs one of the available views				// the following operations can take time if the input text is big				if ( this.options.showResults )				{					if ( this.worker.matches.length > 0 )					{						this.dom_output_result.removeClass("empty");						switch ( this.options.renderer )						{							case "text":								this.dom_output_result.innerHTML = "<pre>" + this.worker.asRawHTML(this.options) + "</pre>";								break;							case "table":								console.debug($(this.worker.asHTMLTable(this.options)));								this.dom_output_result.empty().adopt($(this.worker.asHTMLTable(this.options)));								break;						}					}					else					{						this.dom_output_result.addClass("empty");						this.dom_output_result.innerHTML = "No result.";					}					this.dom_output_result.show();				}				else				{					this.dom_output_result.hide();				}			}			break;			case 's':			{				// first, prints the number of matches				var howmany_text = this.worker.matches.length > 0 ? this.worker.matches.length + " replaced" : "nothing was replaced";				this.dom_output_count.setText(" (" + howmany_text + ")");				this.dom_output_count.toggleClass("alt");				// builds the icons menu and displays/hides all of its clones				if ( this.options.showResults && this.worker.matches.length > 0 )				{					this.filterMenu(['asText','showNonPrintable','copy']);				}				this.duplicateMenu();				// then outputs one of the available views				// the following operations can take time if the input text is big				if ( this.options['showResults'] )				{					this.dom_output_result.innerHTML = "<pre>" + this.worker.asRawHTML(this.options) + "</pre>";					this.dom_output_result.removeClass("empty");					this.dom_output_result.show();				}				else				{					this.dom_output_result.hide();				}			}			break;		}		// in all cases, make sure to show the results		this.accordion.showSection(1);	}	catch ( e )	{		if( $defined(console) )			console.debug(e);		if ( this.options.debug )		{			warning(e.description+" "+e.message);			new ObjectBrowser($('warning'), { data:e });		}		// @see http://msdn.microsoft.com/library/default.asp?url=/library/en-us/script56/html/js56jslrfJScriptErrorsTOC.asp		if ( MSInternetExplorer.version() > 0 )		{			switch ( e.number & 0xFFFF )			{				case 5017:	// Syntax error in regular expression				case 5018:	// Unexpected quantifier				case 5019:	// Expected ']' in regular expression				case 5020:	// Expected ')' in regular expression				case 5021:	// Invalid range in character set					var node = new Element("pre",{'class':"error"});					node.setText(e.description);					this.dom_output_result.empty().adopt(node);					break;				default:					if ( this.options.debug )						return false					else						throw e;			}		}		else if ( e instanceof SyntaxError )		{			var node = new Element("pre",{'class':"error"});			node.setText(e.message);			this.dom_output_result.empty().adopt(node);		}		else		{			if ( this.options.debug )				return false			else				throw e;		}	}	// to signal the form should not be submitted	return false;}
10215	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/10215/04bee043755dbb5afd739bfcb33e66aafc6b4ea9/regexpresso.js/buggy/trunk/src/regexpresso.js