i am using the following function in Edit Tag → Client Side Events:
{ // keys = event types, values = handler functions
“change keyup”: function(e) {
// Your code
var $row = $(this).fields();
var st1 = $row[“fldblock”].toString();
var st2 = $row[“plot_no”].toString();
var st = st1 + st2;
$row[“complete_address”].value(st);
}
}but in the complete_address filed, we have the following text appearing: [object Object][object Object]We just want to put concatenation of block_no and plot_number in field complete_address.
Please help.
Note that $row[“fieldname”] is jQuery object, you cannot use .toString(). If the fields are textboxes, you should use .val().
thanks.
it is resolved. the final script is:
{ // keys = event types, values = handler functions
"change keyup": function(e) {
// Your code
var $row = $(this).fields();
var st = "Plot No." + $row["plot_no"].val() + " Block: " + $row["fldblock"].val();
$row["complete_address"].val(st);
}
}
I also want to concat country name field. which is a Lookup value from another table.
but when i am trying to use var st = “Plot No.” + $row[“plot_no”].val() + " Block: " + $row[“fldblock”].val() + $row[“country”].val();
then the behavior of complete address field changed. Like Plot No. 299 Block: J and when we select country then the complete_address field
converts to 300.Any suggestions please ?
shahparzsoft wrote:
Any suggestions please ?
You may use Option Template for such case. Please read **Lookup Table" topic from PHPMaker Help menu, and see Option Template section in that help.