Skip to content
Browse files

Fixed grower drop list bug on tree form.

  • Loading branch information...
1 parent d1d0b81 commit 0b472d2c9f6ab7f1c27a23cdb311219391dd503f @dth1112 dth1112 committed Mar 17, 2012
Showing with 4 additions and 4 deletions.
  1. +1 −1 ajax.php
  2. +2 −2 index.php
  3. +1 −1 js/event.js
View
2 ajax.php
@@ -227,7 +227,7 @@ function updateTree($exist){
global $db;
global $data;
$id = $_REQUEST['id'];
- $grower_id = $_REQUEST['tree-grower-name'];
+ $grower_id = $_REQUEST['grower_id'];
$tree_type_id = $_REQUEST['tree_type_id'];
$varietal = $_REQUEST['varietal'];
$number = $_REQUEST['number'];
View
4 index.php
@@ -784,7 +784,7 @@ function showAddDelEmailExport(add, del, eml, exp) {
switchNClearForm('tree');
$('#tree3').val(growerID); // last viewed grower
$('#view-grower').hide();
- loadGrowerDropList(0);
+ loadGrowerDropList(growerID);
break;
case 4: // distribution
@@ -1396,7 +1396,7 @@ function showAddDelEmailExport(add, del, eml, exp) {
},
'error': ajaxError
});
- loadGrowerDropList(row[1]);
+ loadGrowerDropList(row[3]);
$('#view-grower').show();
break;
View
2 js/event.js
@@ -346,7 +346,7 @@ function loadGrowerDropList(grower_id){
'type': 'GET',
'url': 'ajax.php?cmd=get_grower_name',
'success': function (data) {
- var str = '<select id="tree-grower-name" name="tree-grower-name">';
+ var str = '<select id="tree3" name="grower_id">';
str += '<option value=0 selected="selected">Select a grower...</option>';
if( data.datatable != null)
for ( var i=0, len = data.datatable.aaData.length; i< len; ++i )

0 comments on commit 0b472d2

Please sign in to comment.
Something went wrong with that request. Please try again.