how to add other AJAX to AS

liquidcms - February 26, 2007 - 19:27
Project:Active Select
Version:HEAD
Component:Code
Category:support request
Priority:normal
Assigned:Unassigned
Status:active
Description

sadly my JS skills are not what they need to be.. I am trying to add an additional AJAX based search routine that triggers off the select lists which are AS enabled.

in typical AJAX fashion i end up having something like:

function PSDB(pick, uri) {
  var db = this;
  this.elt = pick;    alert(this.elt.onchange);
  this.uri = uri;        
  this.elt.onchange = function() {HTTPGet(db.uri, db.receive, db);}
 
}

the problem is that the onchange gets written over by the AS code doing basically the same thing (or the other way around depending on whose last).

from the alert i can see that the select list already has the AS event attached to it; so i thought perhaps i could just add mine to this one and basically end up with:

  this.elt.onchange = function (event) { HTTPGet(db.uri, db.receive, db); return as.onchange(this, event); };

but, sadly that doesn't work.

Anyone know how to hook these 2 events together???

 
 

Drupal is a registered trademark of Dries Buytaert.