diff --git a/module/project/js/common.js b/module/project/js/common.js index 8151b0d61b..396ea4a0eb 100644 --- a/module/project/js/common.js +++ b/module/project/js/common.js @@ -239,11 +239,11 @@ $(function() e.preventDefault(); }); - /*Assign value to the manage products by the different request type.*/ + /* Assign value to the manage products by the different request type.*/ if(window.config.currentMethod === 'create') { var url = window.location.href; - if(window.config.requestType == 'GET') + if(window.config.requestType === 'GET') { var paramStr = url.split('?')[1]; var paramArr = paramStr.split('&'); @@ -256,7 +256,7 @@ $(function() var paramArr = paramStr.split('-'); var productID = paramArr[2] ? paramArr[2].split('.')[0] : 0; } - var product = $('#productsBox .input-group:last select:first'); + var product = $('#products0'); $(product).val(productID); $(product).trigger("chosen:updated"); loadBranches($(product));