From 05adb6ad8caa6cc22793c952a8618e89b16dc116 Mon Sep 17 00:00:00 2001 From: vivekarora Date: Thu, 19 Sep 2013 12:40:07 +0530 Subject: [PATCH] changed the code to fix Js error in FF --- templates/CRM/Contact/Form/Relationship.tpl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/templates/CRM/Contact/Form/Relationship.tpl b/templates/CRM/Contact/Form/Relationship.tpl index 220eab57ed..5ad0f4ebb7 100644 --- a/templates/CRM/Contact/Form/Relationship.tpl +++ b/templates/CRM/Contact/Form/Relationship.tpl @@ -185,10 +185,10 @@ var postUrl = "{/literal}{crmURL p='civicrm/ajax/relationshipContactTypeList' h=0}{literal}"; cj.post( postUrl, { relType: relType }, function ( response ) { - cj( selectID ).append(new Option('{/literal}{ts escape="js"}- create new contact -{/ts}{literal}', '')); + cj( selectID ).get(0).add(new Option('{/literal}{ts escape="js"}- create new contact -{/ts}{literal}', '')); response = eval( response ); - for (i = 0; i <= response.length; i++) { - cj( selectID ).append(new Option(response[i].name, response[i].value)); + for (i = 0; i < response.length; i++) { + cj( selectID ).get(0).add(new Option(response[i].name, response[i].value)); } } ); -- 2.25.1