Re: multiple Event.observe [prototype]

Mescal
Thu, 15 Nov 2007 13:09:35 -0000

hi Gareth Evans,
thanks for reply

[code]
	updateSearchResults1: function() {
		//only make the request if we''re not in the middle of searching
		if(Ajax.activeRequestCount == 0) {
    var pars =''select1=''+
$F(''select1'')+''&select2=''+
$F(''select2'')
+''&select3=''+ $F(''select3'');
    //var pars = this.nomeParametro + ''='' +
$F(this.searchItem);
		pars+= ''&tmp=''+Math.random();

    var url2 ="select2.php";
    var url3 ="select3.php";

			//show the activity indicator
			$(this.activityItem).style.display = '''';

			//make the ajax request
			var myAjax = new Ajax.Request(url2,{method:
''post'',parameters:
pars,onComplete: this.handleSearch2.bind(this)});
      var myAjax1 = new Ajax.Request(url3,{method:
''post'',parameters:
pars,onComplete: this.handleSearch3.bind(this)});
    }
	},
[/code]

and handleSearch2 and handleSearch3

[code]
	handleSearch2: function(originalRequest) {
		//parse the results
		 $(this.resultsItem2).innerHTML = originalRequest.responseText;

		//hide the activity indicator
		$(this.activityItem).style.display = ''none'';
	},
		handleSearch3: function(originalRequest) {
		//parse the results
		 $(this.resultsItem3).innerHTML = originalRequest.responseText;

		//hide the activity indicator
		$(this.activityItem).style.display = ''none'';
	}
[/code]

help me please!!!!