diff --git a/htdocs/lib/lib_head.js b/htdocs/lib/lib_head.js
index 863bb79ffaa..f2cbb8bdd5e 100644
--- a/htdocs/lib/lib_head.js
+++ b/htdocs/lib/lib_head.js
@@ -8,10 +8,10 @@
// \version $Revision$
-function dolibarr_type_reload(param)
+function dolibarr_type_reload(param,formAction,elementName)
{
- document.formsoc.action.value="create";
- document.formsoc.private.value=param;
+ document.formsoc.action.value=formAction;
+ document.formsoc.elementName.value=param;
document.formsoc.cleartype.value=1;
document.formsoc.submit();
}
diff --git a/htdocs/soc.php b/htdocs/soc.php
index 3a0350e5ce5..03700e035db 100644
--- a/htdocs/soc.php
+++ b/htdocs/soc.php
@@ -297,11 +297,11 @@ if ($_POST["getcustomercode"] || $_POST["getsuppliercode"] ||
print "
\n";
print $langs->trans("ThirdPartyType").': ';
print ' '.$langs->trans("Company/Fundation");
print ' ';
print ' '.$langs->trans("Individual");
print ' ('.$langs->trans("ToCreateContactWithSameName").')';
print "
\n";