Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post May 05, 2010 01:21 PM by ignatandrei
Member
7 Points
30 Posts
May 05, 2010 12:51 PM|LINK
$("#ShipFrom_ClientAddressID").bind("change", updateShipFromAddress);
$("#ShipTo_ClientAddressID").bind("change", updateShipFromAddress);
if i bind 2 dropdowlists to the same function how can i identify inside the function what's the caller ?
All-Star
135210 Points
21690 Posts
Moderator
MVP
May 05, 2010 01:21 PM|LINK
jpassos $("#ShipFrom_ClientAddressID").bind("change", updateShipFromAddress);
$("#ShipFrom_ClientAddressID").bind("change",
function(){
updateShipFromAddress(this)
//or
//updateShipFromAddress("#ShipFrom_ClientAddressID")
}
);
function updateShipFromAddress(the_html_object/* or the string*/){ }
jpassos
Member
7 Points
30 Posts
Multiple binding jquery
May 05, 2010 12:51 PM|LINK
$("#ShipFrom_ClientAddressID").bind("change", updateShipFromAddress);
$("#ShipTo_ClientAddressID").bind("change", updateShipFromAddress);
if i bind 2 dropdowlists to the same function how can i identify inside the function what's the caller ?
ignatandrei
All-Star
135210 Points
21690 Posts
Moderator
MVP
Re: Multiple binding jquery
May 05, 2010 01:21 PM|LINK
$("#ShipFrom_ClientAddressID").bind("change",
function(){
updateShipFromAddress(this)
//or
//updateShipFromAddress("#ShipFrom_ClientAddressID")
}
);
function updateShipFromAddress(the_html_object/* or the string*/){
}