diff --git a/htdocs/product/dynamic_price/editor.php b/htdocs/product/dynamic_price/editor.php
index ba00d3be3bd410fab8f1e29759891cc9e4f298e1..dc7c670f4cbd001a762c921459540d44ec092fa8 100644
--- a/htdocs/product/dynamic_price/editor.php
+++ b/htdocs/product/dynamic_price/editor.php
@@ -231,7 +231,7 @@ print '<script type="text/javascript">
 		window.location = "'.str_replace('dynamic_price/editor.php', $tab.'.php', $_SERVER["PHP_SELF"]).'?id='.$id.($tab == 'price' ? '&action=edit_price' : '').'";
 	}
 	function on_change() {
-		window.location = "'.$_SERVER["PHP_SELF"].'?id='.$id.'&tab='.$tab.'&eid=" + $("#expression_selection").attr("value");
+		window.location = "'.$_SERVER["PHP_SELF"].'?id='.$id.'&tab='.$tab.'&eid=" + $("#expression_selection").val();
 	}
 </script>';
 
diff --git a/htdocs/product/fournisseurs.php b/htdocs/product/fournisseurs.php
index dab8d8dcf5d3dfedaf4ba3ab1d070d5f995bb254..04007d2ede18f8ff53a9a47d1f2dad631eb2e732 100644
--- a/htdocs/product/fournisseurs.php
+++ b/htdocs/product/fournisseurs.php
@@ -467,7 +467,7 @@ if ($id > 0 || $ref)
 							window.location = "'.DOL_URL_ROOT.'/product/dynamic_price/editor.php?id='.$id.'&tab=fournisseurs&eid=" + $("#eid").attr("value");
 						}
 						function on_change() {
-							if ($("#eid").attr("value") == 0) {
+							if ($("#eid").val() == 0) {
 								jQuery("#price_numeric").show();
 							} else {
 								jQuery("#price_numeric").hide();
diff --git a/htdocs/product/price.php b/htdocs/product/price.php
index 3f16a20d98b19a160ed082ffc685e51e60cda574..2a770841c603386274c1a1bdef76ef679bf7a08b 100644
--- a/htdocs/product/price.php
+++ b/htdocs/product/price.php
@@ -841,13 +841,13 @@ if ($action == 'edit_price' && $object->getRights()->creer)
 			<script type="text/javascript">
 				jQuery(document).ready(function() {
 					jQuery("#expression_editor").click(function() {
-						window.location = "<?php echo DOL_URL_ROOT ?>/product/dynamic_price/editor.php?id=<?php echo $id ?>&tab=price&eid=" + $("#eid").attr("value");
+						window.location = "<?php echo DOL_URL_ROOT ?>/product/dynamic_price/editor.php?id=<?php echo $id ?>&tab=price&eid=" + $("#eid").val();
 					});
 					jQuery("#eid").change(on_change);
 					on_change();
 				});
 				function on_change() {
-					if ($("#eid").attr("value") == 0) {
+					if ($("#eid").val() == 0) {
 						jQuery("#price_numeric").show();
 					} else {
 						jQuery("#price_numeric").hide();