first I would use jquery to make it easier but if neither of you know it the
first hurdle you will face is multiple clicks so you should put a div and class
around each link and then use jquery's "live" property which will make this
work right or else you'll be scratchin your head trying to get it.
then in the same function use jquery ajax function to grab info.
Also cfm returns json IN ALL CAPS, so propertyID becomes PROPERTYID in the
returned json.
$(function() {
$('td.propertyInfo').live('click',
var PropertyID = this.id;
//the line below is used with a regex to help filter data faster by
adding a
// longer more specific name to the link to speed it up and then the
regex
// removes the additional text: example would be: the table row would
be
//property id but you shouldn't use that id if it's just a number so
adding
//"property-#propertyID#" separates the value from any other possible
conflicts.
var getDataString = $(this).attr('id').replace(/property-/ig, '');
var dataString = "id=" + getDataString;
$.ajax({
type: "post",
url: "assets/cfc/process.cfc?method=getPT&returnFormat=json",
data: dataString,
dataType: "json",
cache: false,
success: function(data) {
//success code here
} else {
$('#submitIt div').removeClass('btnSpin');
//error code here
}
}
});
return false;
});
return false;
});
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Want to reach the ColdFusion community with something they want? Let them know
on the House of Fusion mailing lists
Archive:
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:332398
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm